Skip test_default_external_works on the CI for Ruby 1.9.3.

This test is affected by a bug in Ruby 1.9.3p0 and trunk:
http://redmine.ruby-lang.org/issues/5564

Given we cannot fix it for ourselves, it is better to skip for now so
that we will easily see if further failures are introduced.

Jon Leighton is monitoring the bug report and will revert this when a
suitable solution is found (either a new Ruby release or a generic
workaround).

If you are using 1.9.3 in your app and have templates that are not in
UTF-8, you should add a workaround early on in the boot process. For
example, if your templates are Shift_JIS encoded, then add the
following in an initializer:

Encoding::Converter.new('Shift_JIS', 'UTF-8')
This commit is contained in:
Jon Leighton 2011-11-05 16:42:53 +00:00
parent 9a111c7cf9
commit 10773f94ea
1 changed files with 11 additions and 0 deletions

View File

@ -130,6 +130,17 @@ class TestERBTemplate < ActiveSupport::TestCase
# is set to something other than UTF-8, we don't
# get any errors and get back a UTF-8 String.
def test_default_external_works
if ENV['TRAVIS'] && RUBY_VERSION >= '1.9.3'
skip(
"There is currently a bug in Ruby trunk and in 1.9.3 which makes this test fail. " \
"Please see http://redmine.ruby-lang.org/issues/5564. " \
"Given there is no known generic workaround that this requires a fix in Ruby itself, " \
"this test is skipped on the CI for now so that we don't pollute the CI with failures. " \
"Jon Leighton is monitoring the bug report and will renable this test when a solution " \
"becomes available."
)
end
with_external_encoding "ISO-8859-1" do
@template = new_template("hello \xFCmlat")
assert_equal Encoding::UTF_8, render.encoding