aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/middleware_stack_test.rb
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2016-10-10 02:10:20 -0300
committerGitHub <noreply@github.com>2016-10-10 02:10:20 -0300
commit0cbb0be329e1375e415ad37c9c20ea9f74ff1ac3 (patch)
tree0d0363ee64c840cadf9e0e0d7e32de95633287ae /actionpack/test/dispatch/middleware_stack_test.rb
parent034e4d38b508cbf2a8eaa9742df3e1948e482827 (diff)
parentde9542acd56f60d281465a59eac11e15ca8b3323 (diff)
downloadrails-0cbb0be329e1375e415ad37c9c20ea9f74ff1ac3.tar.gz
rails-0cbb0be329e1375e415ad37c9c20ea9f74ff1ac3.tar.bz2
rails-0cbb0be329e1375e415ad37c9c20ea9f74ff1ac3.zip
Merge pull request #26746 from rails/deprecations
Remove all deprecations from Action Pack
Diffstat (limited to 'actionpack/test/dispatch/middleware_stack_test.rb')
-rw-r--r--actionpack/test/dispatch/middleware_stack_test.rb41
1 files changed, 2 insertions, 39 deletions
diff --git a/actionpack/test/dispatch/middleware_stack_test.rb b/actionpack/test/dispatch/middleware_stack_test.rb
index 27da5935b5..481aa22b10 100644
--- a/actionpack/test/dispatch/middleware_stack_test.rb
+++ b/actionpack/test/dispatch/middleware_stack_test.rb
@@ -18,14 +18,6 @@ class MiddlewareStackTest < ActiveSupport::TestCase
@stack.use BarMiddleware
end
- def test_delete_with_string_is_deprecated
- assert_deprecated do
- assert_difference "@stack.size", -1 do
- @stack.delete FooMiddleware.name
- end
- end
- end
-
def test_delete_works
assert_difference "@stack.size", -1 do
@stack.delete FooMiddleware
@@ -39,24 +31,6 @@ class MiddlewareStackTest < ActiveSupport::TestCase
assert_equal BazMiddleware, @stack.last.klass
end
- test "use should push middleware as a string onto the stack" do
- assert_deprecated do
- assert_difference "@stack.size" do
- @stack.use "MiddlewareStackTest::BazMiddleware"
- end
- assert_equal BazMiddleware, @stack.last.klass
- end
- end
-
- test "use should push middleware as a symbol onto the stack" do
- assert_deprecated do
- assert_difference "@stack.size" do
- @stack.use :"MiddlewareStackTest::BazMiddleware"
- end
- assert_equal BazMiddleware, @stack.last.klass
- end
- end
-
test "use should push middleware class with arguments onto the stack" do
assert_difference "@stack.size" do
@stack.use BazMiddleware, true, foo: "bar"
@@ -107,10 +81,8 @@ class MiddlewareStackTest < ActiveSupport::TestCase
end
test "unshift adds a new middleware at the beginning of the stack" do
- assert_deprecated do
- @stack.unshift :"MiddlewareStackTest::BazMiddleware"
- assert_equal BazMiddleware, @stack.first.klass
- end
+ @stack.unshift MiddlewareStackTest::BazMiddleware
+ assert_equal BazMiddleware, @stack.first.klass
end
test "raise an error on invalid index" do
@@ -123,15 +95,6 @@ class MiddlewareStackTest < ActiveSupport::TestCase
end
end
- test "lazy evaluates middleware class" do
- assert_deprecated do
- assert_difference "@stack.size" do
- @stack.use "MiddlewareStackTest::BazMiddleware"
- end
- assert_equal BazMiddleware, @stack.last.klass
- end
- end
-
test "can check if Middleware are equal - Class" do
assert_equal @stack.last, BarMiddleware
end