mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Fix tests of benchmark with silence equals to true
This commit is contained in:
@@ -1992,9 +1992,7 @@ class BasicsTest < ActiveRecord::TestCase
|
||||
original_logger = ActiveRecord::Base.logger
|
||||
log = StringIO.new
|
||||
ActiveRecord::Base.logger = Logger.new(log)
|
||||
assert_deprecated do
|
||||
ActiveRecord::Base.benchmark("Logging", :level => :debug, :silence => true) { ActiveRecord::Base.logger.debug "Loud" }
|
||||
end
|
||||
ActiveRecord::Base.benchmark("Logging", :level => :debug, :silence => true) { ActiveRecord::Base.logger.debug "Loud" }
|
||||
ActiveRecord::Base.benchmark("Logging", :level => :debug, :silence => false) { ActiveRecord::Base.logger.debug "Quiet" }
|
||||
assert_no_match(/Loud/, log.string)
|
||||
assert_match(/Quiet/, log.string)
|
||||
|
||||
Reference in New Issue
Block a user