Sha256: 55889cec60b15ee57be1a3e1c9e0c1cb6bf3067f206b06a602c800f51621dc0b
Contents?: true
Size: 1021 Bytes
Versions: 187
Compression:
Stored size: 1021 Bytes
Contents
module Kernel # 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 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 def should_not(matcher=nil, message=nil, &block) RSpec::Expectations::NegativeExpectationHandler.handle_matcher(self, matcher, message, &block) end end
Version data entries
187 entries across 86 versions & 10 rubygems