Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Cleanup Parrot after each test.

  • Loading branch information...
commit 5ade4b05933aa986ff130d0f1f881a6d060db6be 1 parent 740862a
@tgxworld tgxworld authored
Showing with 3 additions and 7 deletions.
  1. +3 −7 activerecord/test/cases/autosave_association_test.rb
View
10 activerecord/test/cases/autosave_association_test.rb
@@ -64,10 +64,6 @@ def test_should_not_add_the_same_callbacks_multiple_times_for_has_and_belongs_to
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 @@ def test_autosave_new_record_on_has_many_can_be_disabled_per_relationship
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
Please sign in to comment.
Something went wrong with that request. Please try again.