Skip to content

Commit

Permalink
Test using the ruby install name instead of "ruby". Ruby Bug #5114
Browse files Browse the repository at this point in the history
  • Loading branch information
drbrain committed Aug 1, 2011
1 parent 13d9ef6 commit e16aae7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions test/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 7 additions & 7 deletions test/test_rake_functional.rb
Original file line number Diff line number Diff line change
Expand Up @@ -174,55 +174,55 @@ 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
rakefile_verbose

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
rakefile_verbose

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
rakefile_verbose

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
rakefile_verbose

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
rakefile_verbose

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
rakefile_verbose

rake "standalone_verbose_false"

refute_match(/ruby -e/, @err)
refute_match(/#{Regexp.quote(RUBY)} -e/, @err)
end

def test_dry_run
Expand Down

0 comments on commit e16aae7

Please sign in to comment.