Skip to content

Commit

Permalink
Fix broken test from the earlier merge conflict
Browse files Browse the repository at this point in the history
Seriously people, please run the test before submitting pull request.
  • Loading branch information
sikachu committed Apr 23, 2012
1 parent 0f5af60 commit 0f3fd78
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions actionpack/test/template/render_test.rb
Expand Up @@ -166,7 +166,7 @@ def test_render_partial_with_missing_filename

def test_render_partial_with_incompatible_object
e = assert_raises(ArgumentError) { @view.render(:partial => nil) }
assert_equal "'#{nil.inspect}' is not an ActiveModel-compatible object. It must implement :to_partial_path.", e.message
assert_equal "'#{nil.inspect}' is not an ActiveModel-compatible object that returns a valid partial path.", e.message
end

def test_render_partial_with_errors
Expand Down Expand Up @@ -470,16 +470,18 @@ def test_render_utf8_template_with_default_external_encoding
end
end

def test_render_utf8_template_with_incompatible_external_encoding
with_external_encoding Encoding::SHIFT_JIS do
e = assert_raises(ActionView::Template::Error) { @view.render(:file => "test/utf8", :formats => [:html], :layouts => "layouts/yield") }
assert_match 'Your template was not saved as valid Shift_JIS', e.original_exception.message
def test_render_utf8_template_with_incompatible_external_encoding
with_external_encoding Encoding::SHIFT_JIS do
e = assert_raises(ActionView::Template::Error) { @view.render(:file => "test/utf8", :formats => [:html], :layouts => "layouts/yield") }
assert_match 'Your template was not saved as valid Shift_JIS', e.original_exception.message
end
end

def test_render_utf8_template_with_partial_with_incompatible_encoding
with_external_encoding Encoding::SHIFT_JIS do
e = assert_raises(ActionView::Template::Error) { @view.render(:file => "test/utf8_magic_with_bare_partial", :formats => [:html], :layouts => "layouts/yield") }
assert_match 'Your template was not saved as valid Shift_JIS', e.original_exception.message
def test_render_utf8_template_with_partial_with_incompatible_encoding
with_external_encoding Encoding::SHIFT_JIS do
e = assert_raises(ActionView::Template::Error) { @view.render(:file => "test/utf8_magic_with_bare_partial", :formats => [:html], :layouts => "layouts/yield") }
assert_match 'Your template was not saved as valid Shift_JIS', e.original_exception.message
end
end

def with_external_encoding(encoding)
Expand Down

0 comments on commit 0f3fd78

Please sign in to comment.