From a67b956d28f8c5dddcab65414d2469a2a89c3287 Mon Sep 17 00:00:00 2001 From: Gaurish Sharma Date: Mon, 19 Aug 2013 05:14:33 +0530 Subject: Skip few of the ActiveSupport'sinflector test on JRuby --- activesupport/test/inflector_test.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'activesupport') diff --git a/activesupport/test/inflector_test.rb b/activesupport/test/inflector_test.rb index 1bb2d7e920..32739d45a9 100644 --- a/activesupport/test/inflector_test.rb +++ b/activesupport/test/inflector_test.rb @@ -230,25 +230,35 @@ class InflectorTest < ActiveSupport::TestCase end end +# FIXME: get following tests to pass on jruby, currently skipped +# +# Currently this fails because ActiveSupport::Multibyte::Unicode#tidy_bytes +# required a specific Encoding::Converter(UTF-8 to UTF8-MAC) which unavailable on JRuby +# causing our tests to error out. +# related bug http://jira.codehaus.org/browse/JRUBY-7194 def test_parameterize + jruby_skip "UTF-8 to UTF8-MAC Converter is unavailable" StringToParameterized.each do |some_string, parameterized_string| assert_equal(parameterized_string, ActiveSupport::Inflector.parameterize(some_string)) end end def test_parameterize_and_normalize + jruby_skip "UTF-8 to UTF8-MAC Converter is unavailable" StringToParameterizedAndNormalized.each do |some_string, parameterized_string| assert_equal(parameterized_string, ActiveSupport::Inflector.parameterize(some_string)) end end def test_parameterize_with_custom_separator + jruby_skip "UTF-8 to UTF8-MAC Converter is unavailable" StringToParameterizeWithUnderscore.each do |some_string, parameterized_string| assert_equal(parameterized_string, ActiveSupport::Inflector.parameterize(some_string, '_')) end end def test_parameterize_with_multi_character_separator + jruby_skip "UTF-8 to UTF8-MAC Converter is unavailable" StringToParameterized.each do |some_string, parameterized_string| assert_equal(parameterized_string.gsub('-', '__sep__'), ActiveSupport::Inflector.parameterize(some_string, '__sep__')) end -- cgit v1.2.3 From e998edd2c02667af53dd55cff1b37a6d4661c181 Mon Sep 17 00:00:00 2001 From: Gaurish Sharma Date: Wed, 21 Aug 2013 09:25:28 +0530 Subject: Define jruby_skip to skip test on JRuby --- activesupport/test/abstract_unit.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'activesupport') diff --git a/activesupport/test/abstract_unit.rb b/activesupport/test/abstract_unit.rb index 939bd7bfa8..1b295b0ce0 100644 --- a/activesupport/test/abstract_unit.rb +++ b/activesupport/test/abstract_unit.rb @@ -24,3 +24,8 @@ Thread.abort_on_exception = true # Show backtraces for deprecated behavior for quicker cleanup. ActiveSupport::Deprecation.debug = true + +# Skips the current run on JRuby using Minitest::Assertions#skip +def jruby_skip(message = '') + skip message if RUBY_ENGINE == 'jruby' +end -- cgit v1.2.3