Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 5b66fba60fad48a704e369275a5eee58fbf3d6cf 1 parent 92cf133
Leandro Facchinetti authored
View
2  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"
Please sign in to comment.
Something went wrong with that request. Please try again.