diff options
author | Guillermo Iguaran <guilleiguaran@gmail.com> | 2013-01-18 09:15:19 -0500 |
---|---|---|
committer | Guillermo Iguaran <guilleiguaran@gmail.com> | 2013-01-18 09:15:19 -0500 |
commit | 8aebe30ef4d3d169bfb0900f4f4b396b74c8d20a (patch) | |
tree | 9406b572ea9d9fadcfabca94084834e1188f8c25 /activerecord/test/cases/dirty_test.rb | |
parent | 637a7d9d357a0f3f725b0548282ca8c5e7d4af4a (diff) | |
download | rails-8aebe30ef4d3d169bfb0900f4f4b396b74c8d20a.tar.gz rails-8aebe30ef4d3d169bfb0900f4f4b396b74c8d20a.tar.bz2 rails-8aebe30ef4d3d169bfb0900f4f4b396b74c8d20a.zip |
Revert "Merge pull request #8989 from robertomiranda/use-rails-4-find-by"
This reverts commit 637a7d9d357a0f3f725b0548282ca8c5e7d4af4a, reversing
changes made to 5937bd02dee112646469848d7fe8a8bfcef5b4c1.
Diffstat (limited to 'activerecord/test/cases/dirty_test.rb')
-rw-r--r-- | activerecord/test/cases/dirty_test.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/activerecord/test/cases/dirty_test.rb b/activerecord/test/cases/dirty_test.rb index 4fdade2d87..b9961a4420 100644 --- a/activerecord/test/cases/dirty_test.rb +++ b/activerecord/test/cases/dirty_test.rb @@ -249,21 +249,21 @@ class DirtyTest < ActiveRecord::TestCase pirate.save # check the change from 1 to '' - pirate = Pirate.find_by(catchphrase: "Yarrrr, me hearties") + pirate = Pirate.find_by_catchphrase("Yarrrr, me hearties") pirate.parrot_id = '' assert pirate.parrot_id_changed? assert_equal([1, nil], pirate.parrot_id_change) pirate.save # check the change from nil to 0 - pirate = Pirate.find_by(catchphrase: "Yarrrr, me hearties") + pirate = Pirate.find_by_catchphrase("Yarrrr, me hearties") pirate.parrot_id = 0 assert pirate.parrot_id_changed? assert_equal([nil, 0], pirate.parrot_id_change) pirate.save # check the change from 0 to '' - pirate = Pirate.find_by(catchphrase: "Yarrrr, me hearties") + pirate = Pirate.find_by_catchphrase("Yarrrr, me hearties") pirate.parrot_id = '' assert pirate.parrot_id_changed? assert_equal([0, nil], pirate.parrot_id_change) @@ -494,7 +494,7 @@ class DirtyTest < ActiveRecord::TestCase pirate.reload assert_equal Hash.new, pirate.previous_changes - pirate = Pirate.find_by(catchphrase: "arrr") + pirate = Pirate.find_by_catchphrase("arrr") pirate.catchphrase = "Me Maties!" pirate.save! @@ -505,7 +505,7 @@ class DirtyTest < ActiveRecord::TestCase assert !pirate.previous_changes.key?('parrot_id') assert !pirate.previous_changes.key?('created_on') - pirate = Pirate.find_by(catchphrase: "Me Maties!") + pirate = Pirate.find_by_catchphrase("Me Maties!") pirate.catchphrase = "Thar She Blows!" pirate.save @@ -516,7 +516,7 @@ class DirtyTest < ActiveRecord::TestCase assert !pirate.previous_changes.key?('parrot_id') assert !pirate.previous_changes.key?('created_on') - pirate = Pirate.find_by(catchphrase: "Thar She Blows!") + pirate = Pirate.find_by_catchphrase("Thar She Blows!") pirate.update(catchphrase: "Ahoy!") assert_equal 2, pirate.previous_changes.size @@ -526,7 +526,7 @@ class DirtyTest < ActiveRecord::TestCase assert !pirate.previous_changes.key?('parrot_id') assert !pirate.previous_changes.key?('created_on') - pirate = Pirate.find_by_catchphrase(catchphrase: "Ahoy!") + pirate = Pirate.find_by_catchphrase("Ahoy!") pirate.update_attribute(:catchphrase, "Ninjas suck!") assert_equal 2, pirate.previous_changes.size |