diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-07-20 17:00:12 -0300 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-07-20 23:10:59 +0200 |
commit | 978c49ea6a969fe040ad15dbda78e43ca5afc069 (patch) | |
tree | 5f392ce2cef403dfaea196b1f593531c017ace52 /activerecord/test/cases | |
parent | 6ce761c8d98dafca0baeb298c10dd1fef5e4224f (diff) | |
download | rails-978c49ea6a969fe040ad15dbda78e43ca5afc069.tar.gz rails-978c49ea6a969fe040ad15dbda78e43ca5afc069.tar.bz2 rails-978c49ea6a969fe040ad15dbda78e43ca5afc069.zip |
Make use of severity levels
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/log_subscriber_test.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/activerecord/test/cases/log_subscriber_test.rb b/activerecord/test/cases/log_subscriber_test.rb index 91ba852ecd..342daa19df 100644 --- a/activerecord/test/cases/log_subscriber_test.rb +++ b/activerecord/test/cases/log_subscriber_test.rb @@ -4,6 +4,7 @@ require "active_support/log_subscriber/test_helper" class LogSubscriberTest < ActiveRecord::TestCase include ActiveSupport::LogSubscriber::TestHelper + include ActiveSupport::BufferedLogger::Severity def setup @old_logger = ActiveRecord::Base.logger @@ -41,14 +42,14 @@ class LogSubscriberTest < ActiveRecord::TestCase end def test_basic_query_doesnt_log_when_level_is_not_debug - @logger.level = 1 + @logger.level = INFO Developer.all wait assert_equal 0, @logger.logged(:debug).size end def test_cached_queries_doesnt_log_when_level_is_not_debug - @logger.level = 1 + @logger.level = INFO ActiveRecord::Base.cache do Developer.all Developer.all |