aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/base_test.rb
diff options
context:
space:
mode:
authorRizwan Reza <rizwanreza@gmail.com>2010-03-28 12:04:00 +0430
committerRizwan Reza <rizwanreza@gmail.com>2010-03-28 12:04:00 +0430
commitb4c91de9462f59d6395c7c871aafa3301afdc383 (patch)
treefadcaf603a6f473e8ccd52070a1f3b4f957c34cb /activerecord/test/cases/base_test.rb
parent4b4f69b9bfbd33556e23262f57cf6d944dfd9f63 (diff)
parent66d57d7ba83df52ff1e0485c89f6192c2f84c6b8 (diff)
downloadrails-b4c91de9462f59d6395c7c871aafa3301afdc383.tar.gz
rails-b4c91de9462f59d6395c7c871aafa3301afdc383.tar.bz2
rails-b4c91de9462f59d6395c7c871aafa3301afdc383.zip
Merge remote branch 'rails/master'
Diffstat (limited to 'activerecord/test/cases/base_test.rb')
-rwxr-xr-xactiverecord/test/cases/base_test.rb18
1 files changed, 9 insertions, 9 deletions
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