Permalink
Browse files

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`.
  • Loading branch information...
1 parent 92cf133 commit 5b66fba60fad48a704e369275a5eee58fbf3d6cf Leandro Facchinetti committed Jun 5, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/test/cases/associations/inverse_associations_test.rb
@@ -333,7 +333,7 @@ def test_parent_instance_should_be_shared_with_newly_block_style_created_child
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"

0 comments on commit 5b66fba

Please sign in to comment.