diff --git a/test/helper.rb b/test/helper.rb index 4d8c8185b..636c31b26 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -455,35 +455,35 @@ def rakefile_verbose rakefile <<-VERBOSE task :standalone_verbose_true do verbose true - sh "ruby -e '0'" + sh "#{RUBY} -e '0'" end task :standalone_verbose_false do verbose false - sh "ruby -e '0'" + sh "#{RUBY} -e '0'" end task :inline_verbose_default do - sh "ruby -e '0'" + sh "#{RUBY} -e '0'" end task :inline_verbose_false do - sh "ruby -e '0'", :verbose => false + sh "#{RUBY} -e '0'", :verbose => false end task :inline_verbose_true do - sh "ruby -e '0'", :verbose => true + sh "#{RUBY} -e '0'", :verbose => true end task :block_verbose_true do verbose(true) do - sh "ruby -e '0'" + sh "#{RUBY} -e '0'" end end task :block_verbose_false do verbose(false) do - sh "ruby -e '0'" + sh "#{RUBY} -e '0'" end end VERBOSE diff --git a/test/test_rake_functional.rb b/test/test_rake_functional.rb index 9b3afedc4..9872ae34f 100644 --- a/test/test_rake_functional.rb +++ b/test/test_rake_functional.rb @@ -174,7 +174,7 @@ def test_inline_verbose_default_should_show_command rake "inline_verbose_default" - assert_match(/ruby -e/, @err) + assert_match(/#{Regexp.quote(RUBY)} -e/, @err) end def test_inline_verbose_true_should_show_command @@ -182,7 +182,7 @@ def test_inline_verbose_true_should_show_command rake "inline_verbose_true" - assert_match(/ruby -e/, @err) + assert_match(/#{Regexp.quote(RUBY)} -e/, @err) end def test_inline_verbose_false_should_not_show_command @@ -190,7 +190,7 @@ def test_inline_verbose_false_should_not_show_command rake "inline_verbose_false" - refute_match(/ruby -e/, @err) + refute_match(/#{Regexp.quote(RUBY)} -e/, @err) end def test_block_verbose_false_should_not_show_command @@ -198,7 +198,7 @@ def test_block_verbose_false_should_not_show_command rake "block_verbose_false" - refute_match(/ruby -e/, @err) + refute_match(/#{Regexp.quote(RUBY)} -e/, @err) end def test_block_verbose_true_should_show_command @@ -206,7 +206,7 @@ def test_block_verbose_true_should_show_command rake "block_verbose_true" - assert_match(/ruby -e/, @err) + assert_match(/#{Regexp.quote(RUBY)} -e/, @err) end def test_standalone_verbose_true_should_show_command @@ -214,7 +214,7 @@ def test_standalone_verbose_true_should_show_command rake "standalone_verbose_true" - assert_match(/ruby -e/, @err) + assert_match(/#{Regexp.quote(RUBY)} -e/, @err) end def test_standalone_verbose_false_should_not_show_command @@ -222,7 +222,7 @@ def test_standalone_verbose_false_should_not_show_command rake "standalone_verbose_false" - refute_match(/ruby -e/, @err) + refute_match(/#{Regexp.quote(RUBY)} -e/, @err) end def test_dry_run