diff options
author | Emilio Tagua <miloops@gmail.com> | 2010-09-21 19:48:57 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2010-11-19 19:08:11 -0300 |
commit | 6d58b274222ddd917939998761f75e3d87756a3e (patch) | |
tree | 3c6e9c2dc40a6baac804d97779a4269b09740993 /activerecord | |
parent | ab4238203f886ff6fb2b0060179d39770be6be1c (diff) | |
download | rails-6d58b274222ddd917939998761f75e3d87756a3e.tar.gz rails-6d58b274222ddd917939998761f75e3d87756a3e.tar.bz2 rails-6d58b274222ddd917939998761f75e3d87756a3e.zip |
Set Identity Map disabled by default. Enable it for testing.
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/identity_map.rb | 2 | ||||
-rw-r--r-- | activerecord/test/cases/helper.rb | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/identity_map.rb b/activerecord/lib/active_record/identity_map.rb index 57fcfb5110..511573d497 100644 --- a/activerecord/lib/active_record/identity_map.rb +++ b/activerecord/lib/active_record/identity_map.rb @@ -49,7 +49,7 @@ module ActiveRecord self.repositories ||= Hash.new self.current_repository_name ||= :default - self.enabled = true + self.enabled = false module InstanceMethods diff --git a/activerecord/test/cases/helper.rb b/activerecord/test/cases/helper.rb index d80e2734ce..7db55da02a 100644 --- a/activerecord/test/cases/helper.rb +++ b/activerecord/test/cases/helper.rb @@ -31,6 +31,9 @@ ActiveSupport::Deprecation.debug = true # Quote "type" if it's a reserved word for the current connection. QUOTED_TYPE = ActiveRecord::Base.connection.quote_column_name('type') +# Enable Identity Map for testing +ActiveRecord::IdentityMap.enabled = true + def current_adapter?(*types) types.any? do |type| ActiveRecord::ConnectionAdapters.const_defined?(type) && |