aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/pk_test.rb
diff options
context:
space:
mode:
authorNeeraj Singh <neerajdotname@gmail.com>2010-05-19 15:14:51 -0400
committerJosé Valim <jose.valim@gmail.com>2010-05-19 21:31:51 +0200
commit39a246f545a714b21c669e2f6eda4012526c3874 (patch)
tree89da32733821f0a7dcc56efdac82c72897eca424 /activerecord/test/cases/pk_test.rb
parentbdb2871df7fb0a1eeceadb31aaba4d160df508aa (diff)
downloadrails-39a246f545a714b21c669e2f6eda4012526c3874.tar.gz
rails-39a246f545a714b21c669e2f6eda4012526c3874.tar.bz2
rails-39a246f545a714b21c669e2f6eda4012526c3874.zip
Final iteration of use better testing methods
[#4652 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activerecord/test/cases/pk_test.rb')
-rw-r--r--activerecord/test/cases/pk_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/pk_test.rb b/activerecord/test/cases/pk_test.rb
index 33ad5992de..73f4b3848c 100644
--- a/activerecord/test/cases/pk_test.rb
+++ b/activerecord/test/cases/pk_test.rb
@@ -18,7 +18,7 @@ class PrimaryKeysTest < ActiveRecord::TestCase
def test_to_key_with_customized_primary_key
keyboard = Keyboard.new
- assert keyboard.to_key.nil?
+ assert_nil keyboard.to_key
keyboard.save
assert_equal keyboard.to_key, [keyboard.id]
end
@@ -37,7 +37,7 @@ class PrimaryKeysTest < ActiveRecord::TestCase
topic = Topic.new
topic.title = "New Topic"
- assert_equal(nil, topic.id)
+ assert_nil topic.id
assert_nothing_raised { topic.save! }
id = topic.id