aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/abstract_unit.rb9
-rw-r--r--railties/test/generators/app_generator_test.rb4
2 files changed, 11 insertions, 2 deletions
diff --git a/railties/test/abstract_unit.rb b/railties/test/abstract_unit.rb
index ade08d3f5a..9ccc286b4e 100644
--- a/railties/test/abstract_unit.rb
+++ b/railties/test/abstract_unit.rb
@@ -17,3 +17,12 @@ module TestApp
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
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb
index 56b25e4d9c..8246e76607 100644
--- a/railties/test/generators/app_generator_test.rb
+++ b/railties/test/generators/app_generator_test.rb
@@ -458,14 +458,14 @@ class AppGeneratorTest < Rails::Generators::TestCase
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