aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2011-10-26 00:36:36 -0700
committerSantiago Pastorino <santiago@wyeworks.com>2011-10-26 00:36:36 -0700
commit408bbfe6bdc78a73afe45718a41ea86b97bf0e5a (patch)
tree374f0177b26c7f49e9694ebb9ca812a42856b753 /actionpack
parent80768b739ed7e2053d85a01dd5fa60bde67aad9a (diff)
parentf7e56a3ab6f54ae5b9b021212b3d4e98eae6eeec (diff)
downloadrails-408bbfe6bdc78a73afe45718a41ea86b97bf0e5a.tar.gz
rails-408bbfe6bdc78a73afe45718a41ea86b97bf0e5a.tar.bz2
rails-408bbfe6bdc78a73afe45718a41ea86b97bf0e5a.zip
Merge pull request #3435 from MDaubs/action_pack_deprecations
Fix deprecation warnings in action pack render tests
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/test/template/render_test.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/test/template/render_test.rb b/actionpack/test/template/render_test.rb
index 0ef3239f83..77659918f7 100644
--- a/actionpack/test/template/render_test.rb
+++ b/actionpack/test/template/render_test.rb
@@ -429,7 +429,7 @@ class LazyViewRenderTest < ActiveSupport::TestCase
if '1.9'.respond_to?(:force_encoding)
def test_render_utf8_template_with_magic_comment
with_external_encoding Encoding::ASCII_8BIT do
- result = @view.render(:file => "test/utf8_magic.html", :layouts => "layouts/yield")
+ result = @view.render(:file => "test/utf8_magic", :formats => [:html], :layouts => "layouts/yield")
assert_equal Encoding::UTF_8, result.encoding
assert_equal "\nРусский \nтекст\n\nUTF-8\nUTF-8\nUTF-8\n", result
end
@@ -437,7 +437,7 @@ class LazyViewRenderTest < ActiveSupport::TestCase
def test_render_utf8_template_with_default_external_encoding
with_external_encoding Encoding::UTF_8 do
- result = @view.render(:file => "test/utf8.html", :layouts => "layouts/yield")
+ result = @view.render(:file => "test/utf8", :formats => [:html], :layouts => "layouts/yield")
assert_equal Encoding::UTF_8, result.encoding
assert_equal "Русский текст\n\nUTF-8\nUTF-8\nUTF-8\n", result
end
@@ -446,7 +446,7 @@ class LazyViewRenderTest < ActiveSupport::TestCase
def test_render_utf8_template_with_incompatible_external_encoding
with_external_encoding Encoding::SHIFT_JIS do
begin
- @view.render(:file => "test/utf8.html", :layouts => "layouts/yield")
+ @view.render(:file => "test/utf8", :formats => [:html], :layouts => "layouts/yield")
flunk 'Should have raised incompatible encoding error'
rescue ActionView::Template::Error => error
assert_match 'Your template was not saved as valid Shift_JIS', error.original_exception.message
@@ -457,7 +457,7 @@ class LazyViewRenderTest < ActiveSupport::TestCase
def test_render_utf8_template_with_partial_with_incompatible_encoding
with_external_encoding Encoding::SHIFT_JIS do
begin
- @view.render(:file => "test/utf8_magic_with_bare_partial.html", :layouts => "layouts/yield")
+ @view.render(:file => "test/utf8_magic_with_bare_partial", :formats => [:html], :layouts => "layouts/yield")
flunk 'Should have raised incompatible encoding error'
rescue ActionView::Template::Error => error
assert_match 'Your template was not saved as valid Shift_JIS', error.original_exception.message