Prevent Webmock hash_including from overriding RSpec version 1 hash_including method. #167

Merged
merged 1 commit into from Mar 7, 2012
View
2 lib/webmock/api.rb
@@ -35,6 +35,8 @@ def assert_not_requested(*args, &block)
def hash_including(expected)
if defined?(::RSpec::Mocks::ArgumentMatchers::HashIncludingMatcher)
RSpec::Mocks::ArgumentMatchers::HashIncludingMatcher.new(expected)
+ elsif defined?(::Spec::Mocks::ArgumentMatchers::HashIncludingMatcher)
+ Spec::Mocks::ArgumentMatchers::HashIncludingMatcher.new(expected)
else
WebMock::Matchers::HashIncludingMatcher.new(expected)
end