Skip to content

Commit

Permalink
Check to see if the module we're actually working with is loaded (in …
Browse files Browse the repository at this point in the history
…case only pieces of ActiveRecord are loaded).
  • Loading branch information
jasonmk committed Dec 1, 2011
1 parent 3b7452b commit 402996e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rspec/rails/matchers/relation_match_array.rb
@@ -1,3 +1,3 @@
if defined?(ActiveRecord)
if defined?(ActiveRecord::Relation)
RSpec::Matchers::OperatorMatcher.register(ActiveRecord::Relation, '=~', RSpec::Matchers::MatchArray)
end

0 comments on commit 402996e

Please sign in to comment.