Sha256: fa49c05c4f41d0578cb94a9375c57f280484862938ff63adf505b604f0794315
Contents?: true
Size: 719 Bytes
Versions: 60
Compression:
Stored size: 719 Bytes
Contents
class Object NO_MATCHER_GIVEN = Object.new def should(matcher=NO_MATCHER_GIVEN) MSpec.expectation MSpec.actions :expectation, MSpec.current.state unless matcher.equal?(NO_MATCHER_GIVEN) unless matcher.matches?(self) SpecExpectation.fail_with(*matcher.failure_message) end else SpecPositiveOperatorMatcher.new(self) end end def should_not(matcher=NO_MATCHER_GIVEN) MSpec.expectation MSpec.actions :expectation, MSpec.current.state unless matcher.equal?(NO_MATCHER_GIVEN) if matcher.matches?(self) SpecExpectation.fail_with(*matcher.negative_failure_message) end else SpecNegativeOperatorMatcher.new(self) end end end
Version data entries
60 entries across 60 versions & 3 rubygems