diff options
Diffstat (limited to 'actionpack/test/dispatch/middleware_stack_test.rb')
-rw-r--r-- | actionpack/test/dispatch/middleware_stack_test.rb | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/actionpack/test/dispatch/middleware_stack_test.rb b/actionpack/test/dispatch/middleware_stack_test.rb index 7cf6365af3..170c5b8565 100644 --- a/actionpack/test/dispatch/middleware_stack_test.rb +++ b/actionpack/test/dispatch/middleware_stack_test.rb @@ -66,29 +66,14 @@ class MiddlewareStackTest < ActiveSupport::TestCase assert_equal BazMiddleware, @stack[0].klass end - test "active returns all only enabled middleware" do - assert_no_difference "@stack.active.size" do - assert_difference "@stack.size" do - @stack.use BazMiddleware, :if => lambda { false } - end - end - end - test "lazy evaluates middleware class" do assert_difference "@stack.size" do - @stack.use lambda { BazMiddleware } + @stack.use "MiddlewareStackTest::BazMiddleware" 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 - - test "lazy compares so unloaded constants can be loaded" do + test "lazy compares so unloaded constants are not loaded" do @stack.use "UnknownMiddleware" @stack.use :"MiddlewareStackTest::BazMiddleware" assert @stack.include?("::MiddlewareStackTest::BazMiddleware") |