From d182c22e915b4d5d97d171b9c612b6c37c7d6ded Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Tue, 22 Dec 2015 17:09:26 -0200 Subject: Currectly test the Middleware#== --- actionpack/test/dispatch/middleware_stack_test.rb | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'actionpack/test') 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 -- cgit v1.2.3