Sha256: 718ab957d038a2a91dd50c1feb4b64be66ad39b169c767d583425602c000ef8f
Contents?: true
Size: 1.51 KB
Versions: 18
Compression:
Stored size: 1.51 KB
Contents
module Kernel # :call-seq: # should(matcher) # should == expected # should === expected # should =~ expected # # receiver.should(matcher) # => Passes if matcher.matches?(receiver) # # receiver.should == expected #any value # => Passes if (receiver == expected) # # receiver.should === expected #any value # => Passes if (receiver === expected) # # receiver.should =~ regexp # => Passes if (receiver =~ regexp) # # See Rspec::Matchers for more information about matchers # # == Warning # # NOTE that this does NOT support receiver.should != expected. # Instead, use receiver.should_not == expected def should(matcher=nil, message=nil, &block) Rspec::Expectations::PositiveExpectationHandler.handle_matcher(self, matcher, message, &block) end # :call-seq: # should_not(matcher) # should_not == expected # should_not === expected # should_not =~ expected # # receiver.should_not(matcher) # => Passes unless matcher.matches?(receiver) # # receiver.should_not == expected # => Passes unless (receiver == expected) # # receiver.should_not === expected # => Passes unless (receiver === expected) # # receiver.should_not =~ regexp # => Passes unless (receiver =~ regexp) # # See Rspec::Matchers for more information about matchers def should_not(matcher=nil, message=nil, &block) Rspec::Expectations::NegativeExpectationHandler.handle_matcher(self, matcher, message, &block) end end
Version data entries
18 entries across 18 versions & 1 rubygems