diff options
author | yui-knk <spiketeika@gmail.com> | 2015-12-15 21:12:16 +0900 |
---|---|---|
committer | Yuichiro Kaneko <kaneko.yuichiro@moneyforward.co.jp> | 2015-12-16 19:56:20 +0900 |
commit | 21f4017fd904532ebe4964481567d69636a711cf (patch) | |
tree | b8e28d0a5b39f9db1b424df4d0821cf34aa70352 /activemodel | |
parent | 2de7385cef62ad12cef5bcfe1de18c4662072344 (diff) | |
download | rails-21f4017fd904532ebe4964481567d69636a711cf.tar.gz rails-21f4017fd904532ebe4964481567d69636a711cf.tar.bz2 rails-21f4017fd904532ebe4964481567d69636a711cf.zip |
Deprecate passing string to define callback.
Diffstat (limited to 'activemodel')
-rw-r--r-- | activemodel/test/cases/callbacks_test.rb | 2 | ||||
-rw-r--r-- | activemodel/test/cases/validations/with_validation_test.rb | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/activemodel/test/cases/callbacks_test.rb b/activemodel/test/cases/callbacks_test.rb index 85455c112c..e4ecc0adb4 100644 --- a/activemodel/test/cases/callbacks_test.rb +++ b/activemodel/test/cases/callbacks_test.rb @@ -28,7 +28,7 @@ class CallbacksTest < ActiveModel::TestCase false end - after_create "@callbacks << :final_callback" + ActiveSupport::Deprecation.silence { after_create "@callbacks << :final_callback" } def initialize(options = {}) @callbacks = [] diff --git a/activemodel/test/cases/validations/with_validation_test.rb b/activemodel/test/cases/validations/with_validation_test.rb index 03c7943308..c73580138d 100644 --- a/activemodel/test/cases/validations/with_validation_test.rb +++ b/activemodel/test/cases/validations/with_validation_test.rb @@ -101,6 +101,7 @@ class ValidatesWithTest < ActiveModel::TestCase validator.expect(:new, validator, [{foo: :bar, if: "1 == 1", class: Topic}]) validator.expect(:validate, nil, [topic]) validator.expect(:is_a?, false, [Symbol]) + validator.expect(:is_a?, false, [String]) Topic.validates_with(validator, if: "1 == 1", foo: :bar) assert topic.valid? |