@@ -68,16 +68,6 @@ def test_render_without_options
6868 assert_match ( /You invoked render but did not give any of (.+) option\. / , e . message )
6969 end
7070
71- def test_render_throws_exception_when_given_partial_and_invalid_options
72- e = assert_raises ( ArgumentError ) { @view . render ( template : "test/hello_world" , invalid_option : true ) }
73- assert_includes e . message , "Unknown key: :invalid_option"
74- end
75-
76- def test_render_throws_exception_when_given_template_and_invalid_options
77- e = assert_raises ( ArgumentError ) { @view . render ( partial : "test/partial" , invalid_option : true ) }
78- assert_includes e . message , "Unknown key: :invalid_option"
79- end
80-
8171 def test_render_template
8272 assert_equal "Hello world!" , @view . render ( template : "test/hello_world" )
8373 end
@@ -749,30 +739,30 @@ def setup
749739
750740 def test_render_utf8_template_with_magic_comment
751741 with_external_encoding Encoding ::ASCII_8BIT do
752- result = @view . render ( template : "test/utf8_magic" , formats : [ :html ] )
742+ result = @view . render ( template : "test/utf8_magic" , formats : [ :html ] , layouts : "layouts/yield" )
753743 assert_equal Encoding ::UTF_8 , result . encoding
754744 assert_equal "\n Русский \n текст\n \n UTF-8\n UTF-8\n UTF-8\n " , result
755745 end
756746 end
757747
758748 def test_render_utf8_template_with_default_external_encoding
759749 with_external_encoding Encoding ::UTF_8 do
760- result = @view . render ( template : "test/utf8" , formats : [ :html ] )
750+ result = @view . render ( template : "test/utf8" , formats : [ :html ] , layouts : "layouts/yield" )
761751 assert_equal Encoding ::UTF_8 , result . encoding
762752 assert_equal "Русский текст\n \n UTF-8\n UTF-8\n UTF-8\n " , result
763753 end
764754 end
765755
766756 def test_render_utf8_template_with_incompatible_external_encoding
767757 with_external_encoding Encoding ::SHIFT_JIS do
768- e = assert_raises ( ActionView ::Template ::Error ) { @view . render ( template : "test/utf8" , formats : [ :html ] , layout : "layouts/yield" ) }
758+ e = assert_raises ( ActionView ::Template ::Error ) { @view . render ( template : "test/utf8" , formats : [ :html ] , layouts : "layouts/yield" ) }
769759 assert_match "Your template was not saved as valid Shift_JIS" , e . cause . message
770760 end
771761 end
772762
773763 def test_render_utf8_template_with_partial_with_incompatible_encoding
774764 with_external_encoding Encoding ::SHIFT_JIS do
775- e = assert_raises ( ActionView ::Template ::Error ) { @view . render ( template : "test/utf8_magic_with_bare_partial" , formats : [ :html ] , layout : "layouts/yield" ) }
765+ e = assert_raises ( ActionView ::Template ::Error ) { @view . render ( template : "test/utf8_magic_with_bare_partial" , formats : [ :html ] , layouts : "layouts/yield" ) }
776766 assert_match "Your template was not saved as valid Shift_JIS" , e . cause . message
777767 end
778768 end
0 commit comments