aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorSean Griffin <sean@seantheprogrammer.com>2017-07-18 10:37:31 -0400
committerSean Griffin <sean@seantheprogrammer.com>2017-07-18 10:37:31 -0400
commitc0d8f587757670b3b717f196ba024be9ee60aef6 (patch)
tree3fc2d9877b4ff44a8447c9d9f96d7b64fb81ec88 /activerecord/test
parent020abadf047997cb3df18a59d210dfe4406cf166 (diff)
downloadrails-c0d8f587757670b3b717f196ba024be9ee60aef6.tar.gz
rails-c0d8f587757670b3b717f196ba024be9ee60aef6.tar.bz2
rails-c0d8f587757670b3b717f196ba024be9ee60aef6.zip
Remove deprecated code concerning non-attributes and `*_will_change!`
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/dirty_test.rb8
-rw-r--r--activerecord/test/models/parrot.rb2
2 files changed, 4 insertions, 6 deletions
diff --git a/activerecord/test/cases/dirty_test.rb b/activerecord/test/cases/dirty_test.rb
index 6a5ec8214e..9f57bd5e7f 100644
--- a/activerecord/test/cases/dirty_test.rb
+++ b/activerecord/test/cases/dirty_test.rb
@@ -299,11 +299,9 @@ class DirtyTest < ActiveRecord::TestCase
end
def test_virtual_attribute_will_change
- assert_deprecated do
- parrot = Parrot.create!(name: "Ruby")
- parrot.send(:attribute_will_change!, :cancel_save_from_callback)
- assert parrot.has_changes_to_save?
- end
+ parrot = Parrot.create!(name: "Ruby")
+ parrot.send(:attribute_will_change!, :cancel_save_from_callback)
+ assert parrot.has_changes_to_save?
end
def test_association_assignment_changes_foreign_key
diff --git a/activerecord/test/models/parrot.rb b/activerecord/test/models/parrot.rb
index 1e5f9285a8..255ac19365 100644
--- a/activerecord/test/models/parrot.rb
+++ b/activerecord/test/models/parrot.rb
@@ -8,7 +8,7 @@ class Parrot < ActiveRecord::Base
validates_presence_of :name
- attr_accessor :cancel_save_from_callback
+ attribute :cancel_save_from_callback
before_save :cancel_save_callback_method, if: :cancel_save_from_callback
def cancel_save_callback_method
throw(:abort)