From 10773f94eae0dacf10e2ed0c28f6bb73805c2521 Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Sat, 5 Nov 2011 16:42:53 +0000 Subject: 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') --- actionpack/test/template/template_test.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'actionpack/test/template') diff --git a/actionpack/test/template/template_test.rb b/actionpack/test/template/template_test.rb index 70ca876c67..f3328b5dca 100644 --- a/actionpack/test/template/template_test.rb +++ b/actionpack/test/template/template_test.rb @@ -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 -- cgit v1.2.3