This version adds 3 new features:
- added the possibility to describe an expectation with a sentence(see
<==> or ==>
) - added traits to standardize the creation of groups of examples in an Acceptance specification
- added a
Hamcrest
trait to convert Hamcrest matchers to specs2 matchers (issue 114)
And some improvements:
- added better failure messages to spot faster the issue with
List("1, 2") === List("1", "2")
- when the failure message for
be_==
is too long, split it on 2 lines - added more options to the
FilesRunner
and the possibility to export all possible outputs from it: junitxml, console, html,... - matchers created from function returning a boolean and a failure message will get a proper english negated message when the matcher is negated.
If a matcher
m
returns3 is not even
, thenm.not
returns3 is even
(instead ofnot(3 is even
before) - definition of Given/When/Then steps: if no variable is present in the textual description, the whole string is passed to the step
- a Given/When step can use thrown expectations to check intermediate behavior. If a
FailedException
is thrown, the rest of the steps will not execute - a Given/When step can check a value before passing it to the next step (
"abc" must have size(3)
will pass the stringabc
to the next step) - changed the
Step(stopOnFail=true)
behavior for a sequential specification so that any previous failure will stop the rest of the specification - issue 117: specifications with a 1-argument constructor can be instantiated if the argument has a 0-argument constructor or a 1-argument constructor subject to the same recursive rule
And some fixes:
- fixed issue 109: failing results with
and
must not be re-evaluated - fixed issue 113: added a note in the User Guide showing how to pass arguments to sbt
- fixed issue 115: better parsing of package directives when looking for specifications with the
SpecificationsFinder
trait - fixed issue 116: made sure that a specification referencing itself with the
see
fragment will not recurse forever - fixed a Mockito stubbing issue when the parameter is a Set
- fixed the evaluation of
or
on combinations of values throwing an exception and matchers likethrowAn[Exception]
- fixed the xml matchers in the presence of
Group
nodes
==========================