I’m working with some Specs tests and I’m trying to understand what the “must” function is, and what it does.
I am unable to find its declaration or implementation anywhere in the specs source, and I’m trying to understand what it does.
Here are some example usages of it:
"hello world".size must be equalTo(11)
"hello world" must be matching("h.* w.*")
stack.push(11) must throwAn[Error]
It looks to me like “must” takes a function as an argument, but I’d like to know the actual signature of “must”, and what it does with its argument.
Can anyone point me in the right direction?
Thanks!
At least with Specs2.0, you will find the definition of must in org.specs2.matcher.MustExpectable
The
MustExpectationtrait is here to declare the relevant implicit conversions: