From fb6b80562041e8d2378cad1b51f8c234fe76fd5e Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Tue, 17 Aug 2010 03:29:57 +0200 Subject: code gardening: we have assert_(nil|blank|present), more concise, with better default failure messages - let's use them --- activerecord/test/cases/associations/belongs_to_associations_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/test/cases/associations/belongs_to_associations_test.rb') diff --git a/activerecord/test/cases/associations/belongs_to_associations_test.rb b/activerecord/test/cases/associations/belongs_to_associations_test.rb index a1ce9b1689..28234ebe49 100644 --- a/activerecord/test/cases/associations/belongs_to_associations_test.rb +++ b/activerecord/test/cases/associations/belongs_to_associations_test.rb @@ -22,7 +22,7 @@ class BelongsToAssociationsTest < ActiveRecord::TestCase def test_belongs_to Client.find(3).firm.name assert_equal companies(:first_firm).name, Client.find(3).firm.name - assert !Client.find(3).firm.nil?, "Microsoft should have a firm" + assert_not_nil Client.find(3).firm, "Microsoft should have a firm" end def test_belongs_to_with_primary_key -- cgit v1.2.3