Skip to content

Commit

Permalink
Set Identity Map disabled by default. Enable it for testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
miloops committed Nov 19, 2010
1 parent ab42382 commit 6d58b27
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion activerecord/lib/active_record/identity_map.rb
Expand Up @@ -49,7 +49,7 @@ def clear

self.repositories ||= Hash.new
self.current_repository_name ||= :default
self.enabled = true
self.enabled = false

module InstanceMethods

Expand Down
3 changes: 3 additions & 0 deletions activerecord/test/cases/helper.rb
Expand Up @@ -31,6 +31,9 @@
# 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) &&
Expand Down

0 comments on commit 6d58b27

Please sign in to comment.