diff options
Diffstat (limited to 'actionpack/test/controller/middleware_stack_test.rb')
-rw-r--r-- | actionpack/test/controller/middleware_stack_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/controller/middleware_stack_test.rb b/actionpack/test/controller/middleware_stack_test.rb index 612a710fa7..918231013a 100644 --- a/actionpack/test/controller/middleware_stack_test.rb +++ b/actionpack/test/controller/middleware_stack_test.rb @@ -80,4 +80,11 @@ class MiddlewareStackTest < ActiveSupport::TestCase end assert_equal BazMiddleware, @stack.last.klass end + + test "lazy evaluates middleware arguments" do + assert_difference "@stack.size" do + @stack.use BazMiddleware, lambda { :foo } + end + assert_equal [:foo], @stack.last.send(:build_args) + end end |