Skip to content
This repository
Browse code

Merge pull request #3435 from MDaubs/action_pack_deprecations

Fix deprecation warnings in action pack render tests
  • Loading branch information...
commit 408bbfe6bdc78a73afe45718a41ea86b97bf0e5a 2 parents 80768b7 + f7e56a3
Santiago Pastorino spastorino authored

Showing 1 changed file with 4 additions and 4 deletions. Show diff stats Hide diff stats

  1. +4 4 actionpack/test/template/render_test.rb
8 actionpack/test/template/render_test.rb
@@ -429,7 +429,7 @@ def teardown
429 429 if '1.9'.respond_to?(:force_encoding)
430 430 def test_render_utf8_template_with_magic_comment
431 431 with_external_encoding Encoding::ASCII_8BIT do
432   - result = @view.render(:file => "test/utf8_magic.html", :layouts => "layouts/yield")
  432 + result = @view.render(:file => "test/utf8_magic", :formats => [:html], :layouts => "layouts/yield")
433 433 assert_equal Encoding::UTF_8, result.encoding
434 434 assert_equal "\nРусский \nтекст\n\nUTF-8\nUTF-8\nUTF-8\n", result
435 435 end
@@ -437,7 +437,7 @@ def test_render_utf8_template_with_magic_comment
437 437
438 438 def test_render_utf8_template_with_default_external_encoding
439 439 with_external_encoding Encoding::UTF_8 do
440   - result = @view.render(:file => "test/utf8.html", :layouts => "layouts/yield")
  440 + result = @view.render(:file => "test/utf8", :formats => [:html], :layouts => "layouts/yield")
441 441 assert_equal Encoding::UTF_8, result.encoding
442 442 assert_equal "Русский текст\n\nUTF-8\nUTF-8\nUTF-8\n", result
443 443 end
@@ -446,7 +446,7 @@ def test_render_utf8_template_with_default_external_encoding
446 446 def test_render_utf8_template_with_incompatible_external_encoding
447 447 with_external_encoding Encoding::SHIFT_JIS do
448 448 begin
449   - @view.render(:file => "test/utf8.html", :layouts => "layouts/yield")
  449 + @view.render(:file => "test/utf8", :formats => [:html], :layouts => "layouts/yield")
450 450 flunk 'Should have raised incompatible encoding error'
451 451 rescue ActionView::Template::Error => error
452 452 assert_match 'Your template was not saved as valid Shift_JIS', error.original_exception.message
@@ -457,7 +457,7 @@ def test_render_utf8_template_with_incompatible_external_encoding
457 457 def test_render_utf8_template_with_partial_with_incompatible_encoding
458 458 with_external_encoding Encoding::SHIFT_JIS do
459 459 begin
460   - @view.render(:file => "test/utf8_magic_with_bare_partial.html", :layouts => "layouts/yield")
  460 + @view.render(:file => "test/utf8_magic_with_bare_partial", :formats => [:html], :layouts => "layouts/yield")
461 461 flunk 'Should have raised incompatible encoding error'
462 462 rescue ActionView::Template::Error => error
463 463 assert_match 'Your template was not saved as valid Shift_JIS', error.original_exception.message

0 comments on commit 408bbfe

Please sign in to comment.
Something went wrong with that request. Please try again.