aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/mime_responds_test.rb18
1 files changed, 6 insertions, 12 deletions
diff --git a/actionpack/test/controller/mime_responds_test.rb b/actionpack/test/controller/mime_responds_test.rb
index 8e7d8056a0..8315f90fee 100644
--- a/actionpack/test/controller/mime_responds_test.rb
+++ b/actionpack/test/controller/mime_responds_test.rb
@@ -201,10 +201,8 @@ class RespondToControllerTest < ActionController::TestCase
def teardown
super
- Mime.module_eval { remove_const :IPHONE if const_defined?(:IPHONE) }
- Mime.module_eval { remove_const :MOBILE if const_defined?(:MOBILE) }
- Mime::LOOKUP.reject!{|key,_| key == 'text/x-mobile'}
- Mime::LOOKUP.reject!{|key,_| key == 'text/iphone'}
+ Mime::Type.unregister('text/x-mobile', :iphone)
+ Mime::Type.unregister('text/iphone', :mobile)
end
def test_html
@@ -617,10 +615,8 @@ class RespondWithControllerTest < ActionController::TestCase
def teardown
super
- Mime.module_eval { remove_const :IPHONE if const_defined?(:IPHONE) }
- Mime.module_eval { remove_const :MOBILE if const_defined?(:MOBILE) }
- Mime::LOOKUP.reject!{|key,_| key == 'text/x-mobile'}
- Mime::LOOKUP.reject!{|key,_| key == 'text/iphone'}
+ Mime::Type.unregister('text/x-mobile', :iphone)
+ Mime::Type.unregister('text/iphone', :mobile)
end
def test_using_resource
@@ -1006,10 +1002,8 @@ class MimeControllerLayoutsTest < ActionController::TestCase
def teardown
super
- Mime.module_eval { remove_const :IPHONE if const_defined?(:IPHONE) }
- Mime.module_eval { remove_const :MOBILE if const_defined?(:MOBILE) }
- Mime::LOOKUP.reject!{|key,_| key == 'text/x-mobile'}
- Mime::LOOKUP.reject!{|key,_| key == 'text/iphone'}
+ Mime::Type.unregister('text/x-mobile', :iphone)
+ Mime::Type.unregister('text/iphone', :mobile)
end
def test_missing_layout_renders_properly