From 1def14309f32cc1c7d66b8625754ba2827410c96 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 15 Mar 2010 18:09:33 -0700 Subject: cleaning up a bunch of parse time warnings in AR [#4186 state:resolved] Signed-off-by: wycats --- activerecord/test/cases/base_test.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'activerecord/test/cases/base_test.rb') diff --git a/activerecord/test/cases/base_test.rb b/activerecord/test/cases/base_test.rb index e3047fe873..8774ed58aa 100755 --- a/activerecord/test/cases/base_test.rb +++ b/activerecord/test/cases/base_test.rb @@ -674,10 +674,10 @@ class BasicsTest < ActiveRecord::TestCase def test_decrement_counter Topic.decrement_counter("replies_count", 2) - assert_equal -1, Topic.find(2).replies_count + assert_equal(-1, Topic.find(2).replies_count) Topic.decrement_counter("replies_count", 2) - assert_equal -2, Topic.find(2).replies_count + assert_equal(-2, Topic.find(2).replies_count) end def test_reset_counters @@ -1533,7 +1533,7 @@ class BasicsTest < ActiveRecord::TestCase def test_auto_id auto = AutoId.new auto.save - assert (auto.id > 0) + assert(auto.id > 0) end def quote_column_name(name) @@ -2181,7 +2181,7 @@ class BasicsTest < ActiveRecord::TestCase end def test_inspect_new_instance - assert_match /Topic id: nil/, Topic.new.inspect + assert_match(/Topic id: nil/, Topic.new.inspect) end def test_inspect_limited_select_instance @@ -2240,9 +2240,9 @@ class BasicsTest < ActiveRecord::TestCase ActiveRecord::Base.benchmark("Debug Topic Count", :level => :debug) { Topic.count } ActiveRecord::Base.benchmark("Warn Topic Count", :level => :warn) { Topic.count } ActiveRecord::Base.benchmark("Error Topic Count", :level => :error) { Topic.count } - assert_no_match /Debug Topic Count/, log.string - assert_match /Warn Topic Count/, log.string - assert_match /Error Topic Count/, log.string + assert_no_match(/Debug Topic Count/, log.string) + assert_match(/Warn Topic Count/, log.string) + assert_match(/Error Topic Count/, log.string) ensure ActiveRecord::Base.logger = original_logger end @@ -2253,8 +2253,8 @@ class BasicsTest < ActiveRecord::TestCase ActiveRecord::Base.logger = Logger.new(log) 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 + assert_no_match(/Loud/, log.string) + assert_match(/Quiet/, log.string) ensure ActiveRecord::Base.logger = original_logger end -- cgit v1.2.3