diff options
author | Guo Xiang Tan <tgx_world@hotmail.com> | 2014-03-09 13:16:01 -0700 |
---|---|---|
committer | Guo Xiang Tan <tgx_world@hotmail.com> | 2014-03-09 20:37:31 -0700 |
commit | 5ade4b05933aa986ff130d0f1f881a6d060db6be (patch) | |
tree | 5c9dcb75a23395505d122681584ace25f0155818 | |
parent | 740862a202a91f09d7d8bf93919e3fdc5ce0b75a (diff) | |
download | rails-5ade4b05933aa986ff130d0f1f881a6d060db6be.tar.gz rails-5ade4b05933aa986ff130d0f1f881a6d060db6be.tar.bz2 rails-5ade4b05933aa986ff130d0f1f881a6d060db6be.zip |
Cleanup Parrot after each test.
-rw-r--r-- | activerecord/test/cases/autosave_association_test.rb | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/activerecord/test/cases/autosave_association_test.rb b/activerecord/test/cases/autosave_association_test.rb index 9651244372..f7584c3a51 100644 --- a/activerecord/test/cases/autosave_association_test.rb +++ b/activerecord/test/cases/autosave_association_test.rb @@ -64,10 +64,6 @@ class TestAutosaveAssociationsInGeneral < ActiveRecord::TestCase private - def base - ActiveRecord::Base - end - def assert_no_difference_when_adding_callbacks_twice_for(model, association_name) reflection = model.reflect_on_association(association_name) assert_no_difference "callbacks_for_model(#{model.name}).length" do @@ -622,15 +618,15 @@ end class TestDestroyAsPartOfAutosaveAssociation < ActiveRecord::TestCase self.use_transactional_fixtures = false - def setup - super + setup do @pirate = Pirate.create(:catchphrase => "Don' botharrr talkin' like one, savvy?") @ship = @pirate.create_ship(:name => 'Nights Dirty Lightning') end - def teardown + teardown do # We are running without transactional fixtures and need to cleanup. Bird.delete_all + Parrot.delete_all @ship.delete @pirate.delete end |