From 8e1735e26c378b1ffa8f82ea00f1f498d39c7e9e Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Wed, 15 Jan 2014 11:42:26 +0100 Subject: tests without transactional fixtures need to cleanup afterwards. This fixes test order issues. --- activerecord/test/cases/autosave_association_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'activerecord/test/cases') diff --git a/activerecord/test/cases/autosave_association_test.rb b/activerecord/test/cases/autosave_association_test.rb index 517d2674a7..fe5de44409 100644 --- a/activerecord/test/cases/autosave_association_test.rb +++ b/activerecord/test/cases/autosave_association_test.rb @@ -574,6 +574,13 @@ class TestDestroyAsPartOfAutosaveAssociation < ActiveRecord::TestCase @ship = @pirate.create_ship(:name => 'Nights Dirty Lightning') end + def teardown + # We are running without transactional fixtures and need to cleanup. + Bird.delete_all + @ship.delete + @pirate.delete + end + # reload def test_a_marked_for_destruction_record_should_not_be_be_marked_after_reload @pirate.mark_for_destruction -- cgit v1.2.3