diff options
Diffstat (limited to 'actionpack/test/abstract/callbacks_test.rb')
-rw-r--r-- | actionpack/test/abstract/callbacks_test.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/actionpack/test/abstract/callbacks_test.rb b/actionpack/test/abstract/callbacks_test.rb index b47aeaa08f..07571602e4 100644 --- a/actionpack/test/abstract/callbacks_test.rb +++ b/actionpack/test/abstract/callbacks_test.rb @@ -246,6 +246,26 @@ module AbstractController 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 arguments" do + controller = CallbacksWithArgs.new + controller.process(:index, " Howdy!") + assert_equal "Hello world Howdy!", controller.response_body + end + end + class AliasedCallbacks < ControllerWithCallbacks ActiveSupport::Deprecation.silence do before_filter :first |