aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2013-03-07 07:44:02 -0800
committerRafael Mendonça França <rafaelmfranca@gmail.com>2013-03-07 07:44:02 -0800
commit7a32495e60c7480351d6b87b1c168f18b016e3ec (patch)
tree2bfa615ff4859f4166ecacd8e1c0f32acaf87025 /activerecord
parent173e0e086f7ea88e052ec04e6cc22ee3b6193dca (diff)
parentf15d9bd11612442be4fe18c013bcad77b3d97f6b (diff)
downloadrails-7a32495e60c7480351d6b87b1c168f18b016e3ec.tar.gz
rails-7a32495e60c7480351d6b87b1c168f18b016e3ec.tar.bz2
rails-7a32495e60c7480351d6b87b1c168f18b016e3ec.zip
Merge pull request #9596 from choudhuryanupam/master
Refactored the code to remove irrelevant lines
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/test/cases/associations/belongs_to_associations_test.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/test/cases/associations/belongs_to_associations_test.rb b/activerecord/test/cases/associations/belongs_to_associations_test.rb
index 3a6da0e59f..8664ee99d2 100644
--- a/activerecord/test/cases/associations/belongs_to_associations_test.rb
+++ b/activerecord/test/cases/associations/belongs_to_associations_test.rb
@@ -21,9 +21,9 @@ class BelongsToAssociationsTest < ActiveRecord::TestCase
:posts, :tags, :taggings, :comments, :sponsors, :members
def test_belongs_to
- Client.find(3).firm.name
- assert_equal companies(:first_firm).name, Client.find(3).firm.name
- assert_not_nil Client.find(3).firm, "Microsoft should have a firm"
+ firm = Client.find(3).firm
+ assert_not_nil firm
+ assert_equal companies(:first_firm).name, firm.name
end
def test_belongs_to_with_primary_key