diff options
author | Gaurish Sharma <contact@gaurishsharma.com> | 2014-01-13 16:54:06 +0530 |
---|---|---|
committer | Gaurish Sharma <contact@gaurishsharma.com> | 2014-01-13 19:51:47 +0530 |
commit | 35e56f6fa535288abf1de7fa70c2faed5e2d88ff (patch) | |
tree | bee054c3f8c108ad8976c15259a53dba255c64db /actionpack/test | |
parent | ee4b5f1b8aedc59d94e72e1f0689de48e3b477bb (diff) | |
download | rails-35e56f6fa535288abf1de7fa70c2faed5e2d88ff.tar.gz rails-35e56f6fa535288abf1de7fa70c2faed5e2d88ff.tar.bz2 rails-35e56f6fa535288abf1de7fa70c2faed5e2d88ff.zip |
standardize on jruby_skip & rbx_skip
This Adds helpers(jruby_skip & rbx_skip). In Future, Plan is to use
these helpers instead of calls directly to
RUBY_ENGINE/RbConfig/JRUBY_VERSION
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/abstract_unit.rb | 9 | ||||
-rw-r--r-- | actionpack/test/dispatch/static_test.rb | 4 |
2 files changed, 10 insertions, 3 deletions
diff --git a/actionpack/test/abstract_unit.rb b/actionpack/test/abstract_unit.rb index 37e993b4e5..03a4741f42 100644 --- a/actionpack/test/abstract_unit.rb +++ b/actionpack/test/abstract_unit.rb @@ -351,3 +351,12 @@ module Backoffice class ImagesController < ResourcesController; end end end + +# Skips the current run on Rubinius using Minitest::Assertions#skip +def rubinius_skip(message = '') + skip message if RUBY_ENGINE == 'rbx' +end +# Skips the current run on JRuby using Minitest::Assertions#skip +def jruby_skip(message = '') + skip message if defined?(JRUBY_VERSION) +end diff --git a/actionpack/test/dispatch/static_test.rb b/actionpack/test/dispatch/static_test.rb index d83461e52f..5bd1806b21 100644 --- a/actionpack/test/dispatch/static_test.rb +++ b/actionpack/test/dispatch/static_test.rb @@ -37,10 +37,8 @@ module StaticTests end def test_served_static_file_with_non_english_filename - if RUBY_ENGINE == 'jruby ' - skip "Stop skipping if following bug gets fixed: " \ + jruby_skip "Stop skipping if following bug gets fixed: " \ "http://jira.codehaus.org/browse/JRUBY-7192" - end assert_html "means hello in Japanese\n", get("/foo/#{Rack::Utils.escape("こんにちは.html")}") end |