Permalink
Browse files

tests without transactional fixtures need to cleanup afterwards.

This fixes test order issues.
  • Loading branch information...
1 parent a6512cb commit 8e1735e26c378b1ffa8f82ea00f1f498d39c7e9e @senny senny committed Jan 15, 2014
Showing with 7 additions and 0 deletions.
  1. +7 −0 activerecord/test/cases/autosave_association_test.rb
@@ -574,6 +574,13 @@ def setup
@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

0 comments on commit 8e1735e

Please sign in to comment.