aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/new_base/render_layout_test.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2011-03-25 23:12:09 +0100
committerXavier Noria <fxn@hashref.com>2011-04-13 13:23:18 +0200
commit5850f1693546f14420bf0bc630a48650f0d606d5 (patch)
tree0e7e1b631c5d4e0b85af3b448f39dbf4cb483cb8 /actionpack/test/controller/new_base/render_layout_test.rb
parenteea66892c80d51c1b959171c2e3feac67124aaba (diff)
downloadrails-5850f1693546f14420bf0bc630a48650f0d606d5.tar.gz
rails-5850f1693546f14420bf0bc630a48650f0d606d5.tar.bz2
rails-5850f1693546f14420bf0bc630a48650f0d606d5.zip
removes the RJS template handler
Diffstat (limited to 'actionpack/test/controller/new_base/render_layout_test.rb')
-rw-r--r--actionpack/test/controller/new_base/render_layout_test.rb16
1 files changed, 9 insertions, 7 deletions
diff --git a/actionpack/test/controller/new_base/render_layout_test.rb b/actionpack/test/controller/new_base/render_layout_test.rb
index bb2a953536..d3dcb5cad6 100644
--- a/actionpack/test/controller/new_base/render_layout_test.rb
+++ b/actionpack/test/controller/new_base/render_layout_test.rb
@@ -70,8 +70,8 @@ module ControllerLayouts
class MismatchFormatController < ::ApplicationController
self.view_paths = [ActionView::FixtureResolver.new(
"layouts/application.html.erb" => "<html><%= yield %></html>",
- "controller_layouts/mismatch_format/index.js.rjs" => "page[:test].ext",
- "controller_layouts/mismatch_format/implicit.rjs" => "page[:test].ext"
+ "controller_layouts/mismatch_format/index.xml.builder" => "xml.instruct!",
+ "controller_layouts/mismatch_format/implicit.builder" => "xml.instruct!"
)]
def explicit
@@ -81,15 +81,17 @@ module ControllerLayouts
class MismatchFormatTest < Rack::TestCase
testing ControllerLayouts::MismatchFormatController
+
+ XML_INSTRUCT = %Q(<?xml version="1.0" encoding="UTF-8"?>\n)
- test "if JS is selected, an HTML template is not also selected" do
- get :index, "format" => "js"
- assert_response "$(\"test\").ext();"
+ test "if XML is selected, an HTML template is not also selected" do
+ get :index, :format => "xml"
+ assert_response XML_INSTRUCT
end
- test "if JS is implicitly selected, an HTML template is not also selected" do
+ test "if XML is implicitly selected, an HTML template is not also selected" do
get :implicit
- assert_response "$(\"test\").ext();"
+ assert_response XML_INSTRUCT
end
test "if an HTML template is explicitly provides for a JS template, an error is raised" do