From 12b3799448119a2cd5732670ad7e3cc9ce5707d0 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Sat, 19 Sep 2009 12:50:14 -0500 Subject: Avoid conflicts with another ContentTypeController used in testing --- actionpack/test/controller/content_type_test.rb | 15 +++++++-------- .../render_default_content_types_for_respond_to.xml.erb | 1 - .../fixtures/content_type/render_default_for_rhtml.rhtml | 1 - .../test/fixtures/content_type/render_default_for_rjs.rjs | 1 - .../fixtures/content_type/render_default_for_rxml.rxml | 1 - .../render_default_content_types_for_respond_to.xml.erb | 1 + .../old_content_type/render_default_for_rhtml.rhtml | 1 + .../fixtures/old_content_type/render_default_for_rjs.rjs | 1 + .../old_content_type/render_default_for_rxml.rxml | 1 + 9 files changed, 11 insertions(+), 12 deletions(-) delete mode 100644 actionpack/test/fixtures/content_type/render_default_content_types_for_respond_to.xml.erb delete mode 100644 actionpack/test/fixtures/content_type/render_default_for_rhtml.rhtml delete mode 100644 actionpack/test/fixtures/content_type/render_default_for_rjs.rjs delete mode 100644 actionpack/test/fixtures/content_type/render_default_for_rxml.rxml create mode 100644 actionpack/test/fixtures/old_content_type/render_default_content_types_for_respond_to.xml.erb create mode 100644 actionpack/test/fixtures/old_content_type/render_default_for_rhtml.rhtml create mode 100644 actionpack/test/fixtures/old_content_type/render_default_for_rjs.rjs create mode 100644 actionpack/test/fixtures/old_content_type/render_default_for_rxml.rxml diff --git a/actionpack/test/controller/content_type_test.rb b/actionpack/test/controller/content_type_test.rb index c249788c67..e5ffe20ecc 100644 --- a/actionpack/test/controller/content_type_test.rb +++ b/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 @@ class ContentTypeController < ActionController::Base end class ContentTypeTest < ActionController::TestCase - tests ContentTypeController + tests OldContentTypeController def setup super @@ -73,11 +73,11 @@ class ContentTypeTest < ActionController::TestCase 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 @@ class ContentTypeTest < ActionController::TestCase 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 @@ class ContentTypeTest < ActionController::TestCase end class AcceptBasedContentTypeTest < ActionController::TestCase - - tests ContentTypeController + tests OldContentTypeController def setup super diff --git a/actionpack/test/fixtures/content_type/render_default_content_types_for_respond_to.xml.erb b/actionpack/test/fixtures/content_type/render_default_content_types_for_respond_to.xml.erb deleted file mode 100644 index 25dc746886..0000000000 --- a/actionpack/test/fixtures/content_type/render_default_content_types_for_respond_to.xml.erb +++ /dev/null @@ -1 +0,0 @@ -world \ No newline at end of file diff --git a/actionpack/test/fixtures/content_type/render_default_for_rhtml.rhtml b/actionpack/test/fixtures/content_type/render_default_for_rhtml.rhtml deleted file mode 100644 index c7926d48bb..0000000000 --- a/actionpack/test/fixtures/content_type/render_default_for_rhtml.rhtml +++ /dev/null @@ -1 +0,0 @@ -<%= 'hello world!' %> \ No newline at end of file diff --git a/actionpack/test/fixtures/content_type/render_default_for_rjs.rjs b/actionpack/test/fixtures/content_type/render_default_for_rjs.rjs deleted file mode 100644 index 8d614d04ad..0000000000 --- a/actionpack/test/fixtures/content_type/render_default_for_rjs.rjs +++ /dev/null @@ -1 +0,0 @@ -page.alert 'hello world!' \ No newline at end of file diff --git a/actionpack/test/fixtures/content_type/render_default_for_rxml.rxml b/actionpack/test/fixtures/content_type/render_default_for_rxml.rxml deleted file mode 100644 index 598d62e2fc..0000000000 --- a/actionpack/test/fixtures/content_type/render_default_for_rxml.rxml +++ /dev/null @@ -1 +0,0 @@ -xml.p "Hello world!" \ No newline at end of file diff --git a/actionpack/test/fixtures/old_content_type/render_default_content_types_for_respond_to.xml.erb b/actionpack/test/fixtures/old_content_type/render_default_content_types_for_respond_to.xml.erb new file mode 100644 index 0000000000..25dc746886 --- /dev/null +++ b/actionpack/test/fixtures/old_content_type/render_default_content_types_for_respond_to.xml.erb @@ -0,0 +1 @@ +world \ No newline at end of file diff --git a/actionpack/test/fixtures/old_content_type/render_default_for_rhtml.rhtml b/actionpack/test/fixtures/old_content_type/render_default_for_rhtml.rhtml new file mode 100644 index 0000000000..c7926d48bb --- /dev/null +++ b/actionpack/test/fixtures/old_content_type/render_default_for_rhtml.rhtml @@ -0,0 +1 @@ +<%= 'hello world!' %> \ No newline at end of file diff --git a/actionpack/test/fixtures/old_content_type/render_default_for_rjs.rjs b/actionpack/test/fixtures/old_content_type/render_default_for_rjs.rjs new file mode 100644 index 0000000000..8d614d04ad --- /dev/null +++ b/actionpack/test/fixtures/old_content_type/render_default_for_rjs.rjs @@ -0,0 +1 @@ +page.alert 'hello world!' \ No newline at end of file diff --git a/actionpack/test/fixtures/old_content_type/render_default_for_rxml.rxml b/actionpack/test/fixtures/old_content_type/render_default_for_rxml.rxml new file mode 100644 index 0000000000..598d62e2fc --- /dev/null +++ b/actionpack/test/fixtures/old_content_type/render_default_for_rxml.rxml @@ -0,0 +1 @@ +xml.p "Hello world!" \ No newline at end of file -- cgit v1.2.3