Permalink
Browse files

Merge pull request #13693 from gaurish/typo

[JRuby] Fix incorrect RUBY_ENGINE value
  • Loading branch information...
2 parents e95031f + 35e56f6 commit 050f100d07e12466899c2ee04e3f8872b7e316f1 @senny senny committed Jan 13, 2014
@@ -62,3 +62,12 @@ def set_delivery_method(method)
def restore_delivery_method
ActionMailer::Base.delivery_method = @old_delivery_method
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
@@ -351,3 +351,12 @@ class ProductsController < ResourcesController; end
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
@@ -37,10 +37,8 @@ def test_serves_static_index_file_in_directory
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
@@ -331,3 +331,11 @@ def stderr_logger
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
@@ -34,5 +34,5 @@ def rubinius_skip(message = '')
# Skips the current run on JRuby using Minitest::Assertions#skip
def jruby_skip(message = '')
- skip message if RUBY_ENGINE == 'jruby'
+ skip message if defined?(JRUBY_VERSION)
end
@@ -17,3 +17,12 @@ class Application < Rails::Application
secrets.secret_key_base = 'b3c631c314c0bbca50c1b2843150fe33'
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
@@ -458,14 +458,14 @@ def test_spring
end
def test_spring_binstubs
- skip "spring doesn't run on JRuby" if defined?(JRUBY_VERSION)
+ jruby_skip "spring doesn't run on JRuby"
generator.stubs(:bundle_command).with('install')
generator.expects(:bundle_command).with('exec spring binstub --all').once
quietly { generator.invoke_all }
end
def test_spring_no_fork
- skip "spring doesn't run on JRuby" if defined?(JRUBY_VERSION)
+ jruby_skip "spring doesn't run on JRuby"
Process.stubs(:respond_to?).with(:fork).returns(false)
run_generator

0 comments on commit 050f100

Please sign in to comment.