Passes if matcher returns true. Available on every Object. @example
actual.should eq(expected) actual.should be > 4
@param [Matcher]
matcher
@param [String] message optional message to display when the expectation fails @return [Boolean] true if the expectation succeeds (else raises) @see RSpec::Matchers
# File lib/rspec/expectations/extensions/kernel.rb, line 11 def should(matcher=nil, message=nil, &block) RSpec::Expectations::PositiveExpectationHandler.handle_matcher(self, matcher, message, &block) end
Passes if matcher returns false. Available on every Object. @example
actual.should_not eq(expected)
@param [Matcher]
matcher
@param [String] message optional message to display when the expectation fails @return [Boolean] false if the negative expectation succeeds (else raises) @see RSpec::Matchers
# File lib/rspec/expectations/extensions/kernel.rb, line 23 def should_not(matcher=nil, message=nil, &block) RSpec::Expectations::NegativeExpectationHandler.handle_matcher(self, matcher, message, &block) end
Generated with the Darkfish Rdoc Generator 2.