You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See example below. I'd expect that both examples fail. In practice only the first (eg1) fails.
Specification
import org.specs2.Specification
import org.specs2.execute.Result
import org.specs2.matcher.MustThrownExpectations
class ResultAndSpecification extends Specification with MustThrownExpectations {
def is = {
s2"""
Combining MatchResult and Result should behave like combining MatchResult with MatchResult in MustThrownExpectations.
I'd expect that both examples fail.
- two MatchResults $eg1
- MatchResult and Result $eg2
"""
}
def eg1 = {
(ok and ko)
ok
}
def eg2 = {
ok and (ko: Result)
ok
}
}
Output
[info] ResultAndSpecification
[info] Combining MatchResult and Result should behave like combining MatchResult with MatchResult in MustThrownExpectations.
[info] I'd expect that both examples fail.
[error] x two MatchResults
[error] ko (ResultAndSpecification.scala:26)
[info] + MatchResult and Result
[info] Total for specification ResultAndSpecification
[info] Finished in 28 ms
[info] 2 examples, 1 failure, 0 error
The text was updated successfully, but these errors were encountered:
Environment: Specs 2 4.20.5, Scala 2.12
See example below. I'd expect that both examples fail. In practice only the first (eg1) fails.
Specification
Output
The text was updated successfully, but these errors were encountered: