lib/rspec/mocks/argument_expectation.rb in rspec-mocks-2.6.0 vs lib/rspec/mocks/argument_expectation.rb in rspec-mocks-2.7.0.rc1

- old
+ new

@@ -24,10 +24,10 @@ return ArgumentMatchers::RegexpMatcher.new(arg) if arg.is_a?(Regexp) return ArgumentMatchers::EqualityProxy.new(arg) end def is_matcher?(obj) - !null_object?(obj) & obj.respond_to?(:matches?) & obj.respond_to?(:description) + !null_object?(obj) & obj.respond_to?(:matches?) & [:failure_message_for_should, :failure_message].any? { |m| obj.respond_to?(m) } end def args_match?(*args) match_any_args? || block_passes?(*args) || matchers_match?(*args) end