aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations
diff options
context:
space:
mode:
authorLeandro Facchinetti <git@leafac.com>2014-06-04 23:17:16 -0300
committerLeandro Facchinetti <git@leafac.com>2014-06-04 23:17:16 -0300
commit5b66fba60fad48a704e369275a5eee58fbf3d6cf (patch)
tree650f988766d5605f01955e9b8252c7c000cf0f30 /activerecord/test/cases/associations
parent92cf133788b2bef729ffeda5ca4c87d3a011e7ba (diff)
downloadrails-5b66fba60fad48a704e369275a5eee58fbf3d6cf.tar.gz
rails-5b66fba60fad48a704e369275a5eee58fbf3d6cf.tar.bz2
rails-5b66fba60fad48a704e369275a5eee58fbf3d6cf.zip
Fix inverse associations test
`InverseHasManyTests#test_parent_instance_should_be_shared_within_create_block_of_new_child` was mistakenly the same as `InverseHasManyTests#test_parent_instance_should_be_shared_within_build_block_of_new_child`.
Diffstat (limited to 'activerecord/test/cases/associations')
-rw-r--r--activerecord/test/cases/associations/inverse_associations_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/associations/inverse_associations_test.rb b/activerecord/test/cases/associations/inverse_associations_test.rb
index 893030345f..a674a39d65 100644
--- a/activerecord/test/cases/associations/inverse_associations_test.rb
+++ b/activerecord/test/cases/associations/inverse_associations_test.rb
@@ -333,7 +333,7 @@ class InverseHasManyTests < ActiveRecord::TestCase
def test_parent_instance_should_be_shared_within_create_block_of_new_child
man = Man.first
- interest = man.interests.build do |i|
+ interest = man.interests.create do |i|
assert i.man.equal?(man), "Man of child should be the same instance as a parent"
end
assert interest.man.equal?(man), "Man of the child should still be the same instance as a parent"