aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/batches_test.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2016-07-18 10:41:39 +0200
committerXavier Noria <fxn@hashref.com>2016-07-18 10:45:54 +0200
commitdccc23a503e461820603f3e6901f2321617e7018 (patch)
tree00e5a58a8a290d38fa1b73a85f6116039b660298 /activerecord/test/cases/batches_test.rb
parentb097a48c5f237d6ea30e291824fb39872331d29f (diff)
downloadrails-dccc23a503e461820603f3e6901f2321617e7018.tar.gz
rails-dccc23a503e461820603f3e6901f2321617e7018.tar.bz2
rails-dccc23a503e461820603f3e6901f2321617e7018.zip
deprecates the error_on_ignored_order_or_limit instance reader
Albeit the previous existence of this method is not seen in the patch itself, the declaration mattr_accessor :error_on_ignored_order_or_limit, instance_writer: false was present before. It was removed recently in 210012f.
Diffstat (limited to 'activerecord/test/cases/batches_test.rb')
-rw-r--r--activerecord/test/cases/batches_test.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/activerecord/test/cases/batches_test.rb b/activerecord/test/cases/batches_test.rb
index 837ad76686..8a4c1bd615 100644
--- a/activerecord/test/cases/batches_test.rb
+++ b/activerecord/test/cases/batches_test.rb
@@ -587,7 +587,7 @@ class EachTest < ActiveRecord::TestCase
end
end
- test 'error_on_ignored_order_or_limit= is deprecated' do
+ test '.error_on_ignored_order_or_limit= is deprecated' do
begin
prev = ActiveRecord::Base.error_on_ignored_order
assert_deprecated 'Please use error_on_ignored_order= instead.' do
@@ -599,11 +599,19 @@ class EachTest < ActiveRecord::TestCase
end
end
- test 'error_on_ignored_order_or_limit is deprecated' do
+ test '.error_on_ignored_order_or_limit is deprecated' do
expected = ActiveRecord::Base.error_on_ignored_order
actual = assert_deprecated 'Please use error_on_ignored_order instead.' do
ActiveRecord::Base.error_on_ignored_order_or_limit
end
assert_equal expected, actual
end
+
+ test '#error_on_ignored_order_or_limit is deprecated' do
+ expected = ActiveRecord::Base.error_on_ignored_order
+ actual = assert_deprecated 'Please use error_on_ignored_order instead.' do
+ Post.new.error_on_ignored_order_or_limit
+ end
+ assert_equal expected, actual
+ end
end