aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/callbacks_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/cases/callbacks_test.rb')
-rw-r--r--activerecord/test/cases/callbacks_test.rb17
1 files changed, 8 insertions, 9 deletions
diff --git a/activerecord/test/cases/callbacks_test.rb b/activerecord/test/cases/callbacks_test.rb
index 8a84f19836..7f4d25790b 100644
--- a/activerecord/test/cases/callbacks_test.rb
+++ b/activerecord/test/cases/callbacks_test.rb
@@ -16,6 +16,7 @@ class CallbackDeveloper < ActiveRecord::Base
define_method(callback_method) do
self.history << [callback_method, :method]
end
+ send(callback_method, :"#{callback_method}")
end
def callback_object(callback_method)
@@ -27,15 +28,13 @@ class CallbackDeveloper < ActiveRecord::Base
end
end
- ActiveSupport::Deprecation.silence do
- ActiveRecord::Callbacks::CALLBACKS.each do |callback_method|
- next if callback_method.to_s =~ /^around_/
- define_callback_method(callback_method)
- send(callback_method, callback_string(callback_method))
- send(callback_method, callback_proc(callback_method))
- send(callback_method, callback_object(callback_method))
- send(callback_method) { |model| model.history << [callback_method, :block] }
- end
+ ActiveRecord::Callbacks::CALLBACKS.each do |callback_method|
+ next if callback_method.to_s =~ /^around_/
+ define_callback_method(callback_method)
+ send(callback_method, callback_string(callback_method))
+ send(callback_method, callback_proc(callback_method))
+ send(callback_method, callback_object(callback_method))
+ send(callback_method) { |model| model.history << [callback_method, :block] }
end
def history