Skip to content

Commit e9cee86

Browse files
committed
Merge pull request #2425 from rspec/remove-monkey-patching
Add a check to support both RSpec 3 & 4
1 parent b6dbe51 commit e9cee86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
if defined?(ActiveRecord::Relation)
1+
if defined?(ActiveRecord::Relation) && defined?(RSpec::Matchers::BuiltIn::OperatorMatcher) # RSpec 4 removed OperatorMatcher
22
RSpec::Matchers::BuiltIn::OperatorMatcher.register(ActiveRecord::Relation, '=~', RSpec::Matchers::BuiltIn::ContainExactly)
33
end

0 commit comments

Comments
 (0)