diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-12-22 17:09:26 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-12-22 17:09:26 -0200 |
commit | d182c22e915b4d5d97d171b9c612b6c37c7d6ded (patch) | |
tree | 14a38c3daef3fec2413971da2331668fcc3b9e90 /actionpack | |
parent | d9f4a2839f9b052715d175112ca79f21b2cc2b86 (diff) | |
download | rails-d182c22e915b4d5d97d171b9c612b6c37c7d6ded.tar.gz rails-d182c22e915b4d5d97d171b9c612b6c37c7d6ded.tar.bz2 rails-d182c22e915b4d5d97d171b9c612b6c37c7d6ded.zip |
Currectly test the Middleware#==
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/test/dispatch/middleware_stack_test.rb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/actionpack/test/dispatch/middleware_stack_test.rb b/actionpack/test/dispatch/middleware_stack_test.rb index b8da0024de..a8c8e0784f 100644 --- a/actionpack/test/dispatch/middleware_stack_test.rb +++ b/actionpack/test/dispatch/middleware_stack_test.rb @@ -133,14 +133,18 @@ class MiddlewareStackTest < ActiveSupport::TestCase end test "can check if Middleware are equal - Class" do - assert_equal BazMiddleware, BazMiddleware + assert_equal @stack.last, BarMiddleware + end + + test "includes a class" do + assert_equal true, @stack.include?(BarMiddleware) end test "can check if Middleware are equal - Middleware" do - assert_equal @stack.middlewares.first, @stack.middlewares.first + assert_equal @stack.last, @stack.last end - test "klass is correct" do - assert_equal @stack.middlewares.first.klass, FooMiddleware + test "includes a middleware" do + assert_equal true, @stack.include?(ActionDispatch::MiddlewareStack::Middleware.new(BarMiddleware, nil, nil)) end end |