class CallbacksTest::DeprecatedWarningTest
Public Instance Methods
test_deprecate_string_conditional_options()
click to toggle source
# File activesupport/test/callbacks_test.rb, line 1186 def test_deprecate_string_conditional_options klass = Class.new(Record) assert_deprecated { klass.before_save :tweedle, if: "true" } assert_deprecated { klass.after_save :tweedle, unless: "false" } assert_deprecated { klass.skip_callback :save, :before, :tweedle, if: "true" } assert_deprecated { klass.skip_callback :save, :after, :tweedle, unless: "false" } end