We covered the most basic of the Matchers in the previous section. Further on, we have some more Matchers that are not as generic as the basic Matchers from last section.
We can test if a container has a particular element:
listOfNames should contain("Bob")
This can be used with any type
T that has an implicit type
org.scalatest.enabler.Containing[T]. In the
Containing companion object, implicits are provided for types
(List("Hi", "Di", "Ho") should contain ("ho")) (after being lowerCased)
Note that when you use the explicitly DSL with contain, you need to wrap the entire contain expression in parentheses.