Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Avoid conflicts with another ContentTypeController used in testing

  • Loading branch information...
commit 12b3799448119a2cd5732670ad7e3cc9ce5707d0 1 parent f05b1e5
@josh josh authored
View
15 actionpack/test/controller/content_type_test.rb
@@ -1,6 +1,6 @@
require 'abstract_unit'
-class ContentTypeController < ActionController::Base
+class OldContentTypeController < ActionController::Base
# :ported:
def render_content_type_from_body
response.content_type = Mime::RSS
@@ -56,7 +56,7 @@ def rescue_action(e) raise end
end
class ContentTypeTest < ActionController::TestCase
- tests ContentTypeController
+ tests OldContentTypeController
def setup
super
@@ -73,11 +73,11 @@ def test_render_defaults
end
def test_render_changed_charset_default
- ContentTypeController.default_charset = "utf-16"
+ OldContentTypeController.default_charset = "utf-16"
get :render_defaults
assert_equal "utf-16", @response.charset
assert_equal Mime::HTML, @response.content_type
- ContentTypeController.default_charset = "utf-8"
+ OldContentTypeController.default_charset = "utf-8"
end
# :ported:
@@ -109,12 +109,12 @@ def test_nil_charset_from_body
end
def test_nil_default_for_rhtml
- ContentTypeController.default_charset = nil
+ OldContentTypeController.default_charset = nil
get :render_default_for_rhtml
assert_equal Mime::HTML, @response.content_type
assert_nil @response.charset, @response.headers.inspect
ensure
- ContentTypeController.default_charset = "utf-8"
+ OldContentTypeController.default_charset = "utf-8"
end
def test_default_for_rhtml
@@ -143,8 +143,7 @@ def test_change_for_rxml
end
class AcceptBasedContentTypeTest < ActionController::TestCase
-
- tests ContentTypeController
+ tests OldContentTypeController
def setup
super
View
0  ...ault_content_types_for_respond_to.xml.erb → ...ault_content_types_for_respond_to.xml.erb
File renamed without changes
View
0  ...ntent_type/render_default_for_rhtml.rhtml → ...ntent_type/render_default_for_rhtml.rhtml
File renamed without changes
View
0  ...s/content_type/render_default_for_rjs.rjs → ...d_content_type/render_default_for_rjs.rjs
File renamed without changes
View
0  ...content_type/render_default_for_rxml.rxml → ...content_type/render_default_for_rxml.rxml
File renamed without changes
Please sign in to comment.
Something went wrong with that request. Please try again.