aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/test/cases/callbacks_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activemodel/test/cases/callbacks_test.rb')
-rw-r--r--activemodel/test/cases/callbacks_test.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/activemodel/test/cases/callbacks_test.rb b/activemodel/test/cases/callbacks_test.rb
index e4ecc0adb4..63b6c56f8c 100644
--- a/activemodel/test/cases/callbacks_test.rb
+++ b/activemodel/test/cases/callbacks_test.rb
@@ -1,7 +1,6 @@
require "cases/helper"
class CallbacksTest < ActiveModel::TestCase
-
class CallbackValidator
def around_create(model)
model.callbacks << :before_around_create
@@ -110,8 +109,8 @@ class CallbacksTest < ActiveModel::TestCase
end
extend ActiveModel::Callbacks
define_model_callbacks :create
- def callback1; self.history << 'callback1'; end
- def callback2; self.history << 'callback2'; end
+ def callback1; history << "callback1"; end
+ def callback2; history << "callback2"; end
def create
run_callbacks(:create) {}
self
@@ -131,5 +130,4 @@ class CallbacksTest < ActiveModel::TestCase
test "after_create callbacks with both callbacks declared in different lines" do
assert_equal ["callback1", "callback2"], Violin2.new.create.history
end
-
end