I tried
assert(anOption)(contains("x"))
But that only works for Iterables such as List or Seq.
assert(anOption)(isSome(equalTo("x")))
Could also be assert(anOption)(equalTo(Some("x"))) - just using equality. Or if you want to use contains: assert(isTrue(anOption.contains("x"))) using the contains operator on option
assert(anOption)(equalTo(Some("x")))
assert(isTrue(anOption.contains("x")))