System notice: In light of the Debian OpenSSL security issue we've regenerated the server keys. See this thread for instructions and the new key fingerprints.

Commit 2a606a4a4366ce305fcfc05f4ed7cd4d41931f76

rename default matcher symbol

Commit diff

rspec/lib/spec/expectations/extensions/object.rb

 
2727 #
2828 # NOTE that this does NOT support receiver.should != expected.
2929 # Instead, use receiver.should_not == expected
30 def should(matcher = :default_parameter, &block)
30 def should(matcher=:use_operator_matcher, &block)
3131 ExpectationMatcherHandler.handle_matcher(self, matcher, &block)
3232 end
3333
5050 # => Passes unless (receiver =~ regexp)
5151 #
5252 # See Spec::Matchers for more information about matchers
53 def should_not(matcher = :default_parameter, &block)
53 def should_not(matcher=:use_operator_matcher, &block)
5454 NegativeExpectationMatcherHandler.handle_matcher(self, matcher, &block)
5555 end
5656
toggle raw diff

rspec/lib/spec/expectations/handler.rb

 
1212 class << self
1313 include MatcherHandlerHelper
1414 def handle_matcher(actual, matcher, &block)
15 if :default_parameter == matcher
15 if :use_operator_matcher == matcher
1616 return Spec::Matchers::PositiveOperatorMatcher.new(actual)
1717 end
1818
3131 class << self
3232 include MatcherHandlerHelper
3333 def handle_matcher(actual, matcher, &block)
34 if :default_parameter == matcher
34 if :use_operator_matcher == matcher
3535 return Spec::Matchers::NegativeOperatorMatcher.new(actual)
3636 end
3737
toggle raw diff