Tests an expectation against the given object.
"hello".should eql("hello") 13.should equal(13) lambda { raise "u r doomed" }.should raise_error
# File lib/matchy/modals.rb, line 11 def should(expectation = nil) Matchy::ExpectationBuilder.build_expectation(true, expectation, self) end
Tests that an expectation doesn't match the given object.
"hello".should_not eql("hi") 41.should_not equal(13) lambda { "savd bai da bell" }.should_not raise_error
# File lib/matchy/modals.rb, line 25 def should_not(expectation = nil) Matchy::ExpectationBuilder.build_expectation(false, expectation, self) end