mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Fix 1.9.2 failures.
This commit is contained in:
@@ -32,8 +32,8 @@ class TestERBTemplate < ActiveSupport::TestCase
|
||||
end
|
||||
end
|
||||
|
||||
def new_template(body = "<%= hello %>", handler = ERBHandler, details = {})
|
||||
ActionView::Template.new(body, "hello template", ERBHandler, {:virtual_path => "hello"})
|
||||
def new_template(body = "<%= hello %>", details = {})
|
||||
ActionView::Template.new(body, "hello template", ERBHandler, {:virtual_path => "hello"}.merge!(details))
|
||||
end
|
||||
|
||||
def render(locals = {})
|
||||
@@ -102,7 +102,7 @@ class TestERBTemplate < ActiveSupport::TestCase
|
||||
# inside Rails.
|
||||
def test_lying_with_magic_comment
|
||||
assert_raises(ActionView::Template::Error) do
|
||||
@template = new_template("# encoding: UTF-8\nhello \xFCmlat")
|
||||
@template = new_template("# encoding: UTF-8\nhello \xFCmlat", :virtual_path => nil)
|
||||
render
|
||||
end
|
||||
end
|
||||
@@ -118,7 +118,7 @@ class TestERBTemplate < ActiveSupport::TestCase
|
||||
|
||||
def test_error_when_template_isnt_valid_utf8
|
||||
assert_raises(ActionView::Template::Error, /\xFC/) do
|
||||
@template = new_template("hello \xFCmlat")
|
||||
@template = new_template("hello \xFCmlat", :virtual_path => nil)
|
||||
render
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user