specs2의 기본 제공 매처가 사용될 수 있음을 보고합니다.
예:
class TestSpec extends Specification { def is = s2"""
This is a spec
opt
should contain 1 $e1
"""
def e1 = {
val opt = Some(1)
opt must equalTo (Some(1))
}
}
빠른 수정 적용 후:
class TestSpec extends Specification { def is = s2"""
This is a spec
opt
should contain 1 $e1
"""
def e1 = {
val opt = Some(1)
opt must beSome(1)
}
}