mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user