Method: Object#should
- Defined in:
- lib/mspec/expectations/should.rb
#should(matcher = NO_MATCHER_GIVEN) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/mspec/expectations/should.rb', line 3 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.) end else SpecPositiveOperatorMatcher.new(self) end end |