diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2007-09-25 15:09:21 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2007-09-25 15:09:21 +0000 |
commit | 06dd4b3166d3b30264ac2f14f48e385e404d8ceb (patch) | |
tree | 9993823ca0dfab73c37fe8c99b806801fa96a516 | |
parent | 55a9c86e6228b4286df7fb59c326832b57aa0f54 (diff) | |
download | rails-06dd4b3166d3b30264ac2f14f48e385e404d8ceb.tar.gz rails-06dd4b3166d3b30264ac2f14f48e385e404d8ceb.tar.bz2 rails-06dd4b3166d3b30264ac2f14f48e385e404d8ceb.zip |
Better failing tests
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7630 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
3 files changed, 6 insertions, 6 deletions
diff --git a/actionpack/test/controller/mime_responds_test.rb b/actionpack/test/controller/mime_responds_test.rb index 959cb7c2f4..ab5132bc45 100644 --- a/actionpack/test/controller/mime_responds_test.rb +++ b/actionpack/test/controller/mime_responds_test.rb @@ -133,7 +133,7 @@ class RespondToController < ActionController::Base protected def set_layout if ["all_types_with_layout", "iphone_with_html_response_type"].include?(action_name) - "standard" + "respond_to/layouts/standard" end end end @@ -327,7 +327,7 @@ class MimeControllerTest < Test::Unit::TestCase def test_html_type_with_layout @request.env["HTTP_ACCEPT"] = "text/html" get :all_types_with_layout - assert_equal '<html>HTML for all_types_with_layout</html>', @response.body + assert_equal '<html><div id="html">HTML for all_types_with_layout</div></html>', @response.body end def test_xhr @@ -396,17 +396,17 @@ class MimeControllerTest < Test::Unit::TestCase def test_format_with_custom_response_type get :iphone_with_html_response_type - assert_equal "<html>Hello future from Firefox!</html>", @response.body + assert_equal '<html><div id="html">Hello future from Firefox!</div></html>', @response.body get :iphone_with_html_response_type, :format => "iphone" assert_equal "text/html", @response.content_type - assert_equal "<html>Hello iPhone future from iPhone!</html>", @response.body + assert_equal '<html><div id="iphone">Hello iPhone future from iPhone!</div></html>', @response.body end def test_format_with_custom_response_type_and_request_headers @request.env["HTTP_ACCEPT"] = "text/iphone" get :iphone_with_html_response_type - assert_equal "<html>Hello future from iPhone!</html>", @response.body + assert_equal '<html><div id="iphone">Hello iPhone future from iPhone!</div></html>', @response.body assert_equal "text/html", @response.content_type end end diff --git a/actionpack/test/fixtures/respond_to/layouts/standard.html.erb b/actionpack/test/fixtures/respond_to/layouts/standard.html.erb new file mode 100644 index 0000000000..c6c1a586dd --- /dev/null +++ b/actionpack/test/fixtures/respond_to/layouts/standard.html.erb @@ -0,0 +1 @@ +<html><div id="html"><%= yield %></div></html>
\ No newline at end of file diff --git a/actionpack/test/fixtures/respond_to/layouts/standard.rhtml b/actionpack/test/fixtures/respond_to/layouts/standard.rhtml deleted file mode 100644 index fcb28ec755..0000000000 --- a/actionpack/test/fixtures/respond_to/layouts/standard.rhtml +++ /dev/null @@ -1 +0,0 @@ -<html><%= @content_for_layout %></html>
\ No newline at end of file |