diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-11-23 12:00:17 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-11-23 14:29:05 -0800 |
commit | fe4388eb15d44612710f2fc2f81c90a890278b23 (patch) | |
tree | 45a7547892d364c33477de7a0b4e3aa727b3c13b /activerecord/test | |
parent | 064c28d6c290cb9b6222b2348e38e713b82a89d6 (diff) | |
download | rails-fe4388eb15d44612710f2fc2f81c90a890278b23.tar.gz rails-fe4388eb15d44612710f2fc2f81c90a890278b23.tar.bz2 rails-fe4388eb15d44612710f2fc2f81c90a890278b23.zip |
converting clone test to dup test
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/autosave_association_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/test/cases/autosave_association_test.rb b/activerecord/test/cases/autosave_association_test.rb index b13cb2d7a2..fbf7121468 100644 --- a/activerecord/test/cases/autosave_association_test.rb +++ b/activerecord/test/cases/autosave_association_test.rb @@ -163,15 +163,15 @@ class TestDefaultAutosaveAssociationOnAHasOneAssociation < ActiveRecord::TestCas firm.account = Account.find(:first) assert_queries(Firm.partial_updates? ? 0 : 1) { firm.save! } - firm = Firm.find(:first).clone + firm = Firm.find(:first).dup firm.account = Account.find(:first) assert_queries(2) { firm.save! } - firm = Firm.find(:first).clone - firm.account = Account.find(:first).clone + firm = Firm.find(:first).dup + firm.account = Account.find(:first).dup assert_queries(2) { firm.save! } end - + def test_callbacks_firing_order_on_create eye = Eye.create(:iris_attributes => {:color => 'honey'}) assert_equal [true, false], eye.after_create_callbacks_stack |