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>
This commit is contained in:
Emilio Tagua
2011-04-05 17:01:54 -03:00
committed by José Valim
parent cb9e501a28
commit 18dde7bf4f

View File

@@ -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 @@ class LogSubscriberTest < ActiveRecord::TestCase
super
ActiveRecord::LogSubscriber.log_subscribers.pop
ActiveRecord::Base.logger = @old_logger
ActiveRecord::IdentityMap.enabled = @using_identity_map
end
def set_logger(logger)