aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/abstract/callbacks_test.rb
diff options
context:
space:
mode:
authorNick Sutterer <apotonick@gmail.com>2010-12-29 23:56:58 +0100
committerwycats <wycats@gmail.com>2010-12-29 16:37:10 -0800
commitdb24701abed4858d9b326bbaaf5c08726e4ced75 (patch)
tree3c27b928cedb818a28c0fa8da376493002d42917 /actionpack/test/abstract/callbacks_test.rb
parent69765aad8bcc853e7ab6b0e79f4edece2cdd7fe2 (diff)
downloadrails-db24701abed4858d9b326bbaaf5c08726e4ced75.tar.gz
rails-db24701abed4858d9b326bbaaf5c08726e4ced75.tar.bz2
rails-db24701abed4858d9b326bbaaf5c08726e4ced75.zip
process_action accepts multiple args, even with Callbacks.
Diffstat (limited to 'actionpack/test/abstract/callbacks_test.rb')
-rw-r--r--actionpack/test/abstract/callbacks_test.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/actionpack/test/abstract/callbacks_test.rb b/actionpack/test/abstract/callbacks_test.rb
index 2d02078020..5308fc849b 100644
--- a/actionpack/test/abstract/callbacks_test.rb
+++ b/actionpack/test/abstract/callbacks_test.rb
@@ -245,6 +245,27 @@ module AbstractController
assert_equal "Success", controller.response_body
end
end
+
+ class CallbacksWithArgs < ControllerWithCallbacks
+ set_callback :process_action, :before, :first
+
+ def first
+ @text = "Hello world"
+ end
+
+ def index(text)
+ self.response_body = @text + text
+ end
+ end
+
+ class TestCallbacksWithArgs < ActiveSupport::TestCase
+ test "callbacks still work when invoking process with multiple args" do
+ controller = CallbacksWithArgs.new
+ result = controller.process(:index, " Howdy!")
+ assert_equal "Hello world Howdy!", controller.response_body
+ end
+ end
+
end
end