We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f33dde7 + f182eac commit 886e867Copy full SHA for 886e867
lib/rspec/rails/active_record.rb
@@ -7,7 +7,7 @@ class ActiveRecordConfiguration
7
def self.initialize_activerecord_configuration(config)
8
config.before :suite do
9
# This allows dynamic columns etc to be used on ActiveRecord models when creating instance_doubles
10
- if defined?(ActiveRecord) && defined?(ActiveRecord::Base) && defined?(::RSpec::Mocks)
+ if defined?(ActiveRecord) && defined?(ActiveRecord::Base) && defined?(::RSpec::Mocks) && (::RSpec::Mocks.respond_to?(:configuration))
11
::RSpec::Mocks.configuration.when_declaring_verifying_double do |possible_model|
12
target = possible_model.target
13
0 commit comments