title: Comparing collection contents with ScalaTest
body: <p>I'm trying to unit-test some Scala that is very collection-heavy. These collections are returned as <code>Iterable[T]</code>, so I am interested in the <em>contents</em> of the collection, even if the underlying types differ. This is actually two related problems:</p>
  
  <ol>
  <li>How do I assert that two <strong>ordered</strong> collections contain the same sequence of elements?</li>
  <li>How do I assert that two <strong>unordered</strong> collections contain the same set of elements?</li>
  </ol>
  
  <p>In summary, I'm looking the Scala-equivalent of NUnit's <code>CollectionAssert.AreEqual</code> (ordered) and <code>CollectionAssert.AreEquivalent</code> (unordered) in ScalaTest:</p>
  
  <pre><code>Set(1, 2) should equal (List(1, 2))          // ordered, pass
  Iterable(2, 1) should equal (Iterable(1, 2)) // unordered, pass
  </code></pre>