From 46e997430a857eb265739e5891aa34c7e8cfbea2 Mon Sep 17 00:00:00 2001 From: Yasuo Honda Date: Thu, 24 Aug 2017 15:47:20 +0000 Subject: Address `test_after_save_callback_with_autosave` failure when other `AutomaticInverseFindingTests` load `:comments` fixture but does not load `:posts`. Refer #30385 for similar issue --- activerecord/test/cases/autosave_association_test.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/activerecord/test/cases/autosave_association_test.rb b/activerecord/test/cases/autosave_association_test.rb index ae492f1c1c..da5e830ebc 100644 --- a/activerecord/test/cases/autosave_association_test.rb +++ b/activerecord/test/cases/autosave_association_test.rb @@ -1724,6 +1724,10 @@ class TestAutosaveAssociationOnAHasManyAssociationWithInverse < ActiveRecord::Te end end + def setup + Comment.delete_all + end + def test_after_save_callback_with_autosave post = Post.new(title: "Test", body: "...") comment = post.comments.build(body: "...") -- cgit v1.2.3