test-rake.diff

Jeremy Evans, 07/30/2011 03:25 AM

Download (2.7 KB)

View differences:

test/rake/helper.rb Wed Jul 27 15:48:16 2011
455 455
    rakefile <<-VERBOSE
456 456
task :standalone_verbose_true do
457 457
  verbose true
458
  sh "ruby -e '0'"
458
  sh "#{RUBY} -e '0'"
459 459
end
460 460

  
461 461
task :standalone_verbose_false do
462 462
  verbose false
463
  sh "ruby -e '0'"
463
  sh "#{RUBY} -e '0'"
464 464
end
465 465

  
466 466
task :inline_verbose_default do
467
  sh "ruby -e '0'"
467
  sh "#{RUBY} -e '0'"
468 468
end
469 469

  
470 470
task :inline_verbose_false do
471
  sh "ruby -e '0'", :verbose => false
471
  sh "#{RUBY} -e '0'", :verbose => false
472 472
end
473 473

  
474 474
task :inline_verbose_true do
475
  sh "ruby -e '0'", :verbose => true
475
  sh "#{RUBY} -e '0'", :verbose => true
476 476
end
477 477

  
478 478
task :block_verbose_true do
479 479
  verbose(true) do
480
    sh "ruby -e '0'"
480
    sh "#{RUBY} -e '0'"
481 481
  end
482 482
end
483 483

  
484 484
task :block_verbose_false do
485 485
  verbose(false) do
486
    sh "ruby -e '0'"
486
    sh "#{RUBY} -e '0'"
487 487
  end
488 488
end
489 489
    VERBOSE
490
-- test/rake/test_rake_functional.rb.orig	Wed Jul 27 15:49:14 2011
490
++ test/rake/test_rake_functional.rb	Wed Jul 27 15:49:18 2011
......
174 174

  
175 175
    rake "inline_verbose_default"
176 176

  
177
    assert_match(/ruby -e/, @err)
177
    assert_match(/#{Regexp.quote(RUBY)} -e/, @err)
178 178
  end
179 179

  
180 180
  def test_inline_verbose_true_should_show_command
......
182 182

  
183 183
    rake "inline_verbose_true"
184 184

  
185
    assert_match(/ruby -e/, @err)
185
    assert_match(/#{Regexp.quote(RUBY)} -e/, @err)
186 186
  end
187 187

  
188 188
  def test_inline_verbose_false_should_not_show_command
......
190 190

  
191 191
    rake "inline_verbose_false"
192 192

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

  
196 196
  def test_block_verbose_false_should_not_show_command
......
198 198

  
199 199
    rake "block_verbose_false"
200 200

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

  
204 204
  def test_block_verbose_true_should_show_command
......
206 206

  
207 207
    rake "block_verbose_true"
208 208

  
209
    assert_match(/ruby -e/, @err)
209
    assert_match(/#{Regexp.quote(RUBY)} -e/, @err)
210 210
  end
211 211

  
212 212
  def test_standalone_verbose_true_should_show_command
......
214 214

  
215 215
    rake "standalone_verbose_true"
216 216

  
217
    assert_match(/ruby -e/, @err)
217
    assert_match(/#{Regexp.quote(RUBY)} -e/, @err)
218 218
  end
219 219

  
220 220
  def test_standalone_verbose_false_should_not_show_command
......
222 222

  
223 223
    rake "standalone_verbose_false"
224 224

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

  
228 228
  def test_dry_run