Skip to content
Browse files

Disable IdentityMap in log tests, it's not important and when running…

… tests rake task it logs more messages in the tested buffer.

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
1 parent cb9e501 commit 18dde7bf4ffffc93c9b32df65c168df29a898fbb @miloops miloops committed with josevalim Apr 5, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 activerecord/test/cases/log_subscriber_test.rb
View
3 activerecord/test/cases/log_subscriber_test.rb
@@ -8,6 +8,8 @@ class LogSubscriberTest < ActiveRecord::TestCase
def setup
@old_logger = ActiveRecord::Base.logger
+ @using_identity_map = ActiveRecord::IdentityMap.enabled?
+ ActiveRecord::IdentityMap.enabled = false
super
ActiveRecord::LogSubscriber.attach_to(:active_record)
end
@@ -16,6 +18,7 @@ def teardown
super
ActiveRecord::LogSubscriber.log_subscribers.pop
ActiveRecord::Base.logger = @old_logger
+ ActiveRecord::IdentityMap.enabled = @using_identity_map
end
def set_logger(logger)

0 comments on commit 18dde7b

Please sign in to comment.
Something went wrong with that request. Please try again.