2011-06-27 22:45:29 -04:00
|
|
|
require File.expand_path('../helper', __FILE__)
|
|
|
|
|
|
|
|
class TestRakeRakeTestLoader < Rake::TestCase
|
|
|
|
|
|
|
|
def test_pattern
|
2013-10-11 17:35:01 -04:00
|
|
|
orig_loaded_features = $:.dup
|
2011-06-27 22:45:29 -04:00
|
|
|
FileUtils.touch 'foo.rb'
|
|
|
|
FileUtils.touch 'test_a.rb'
|
|
|
|
FileUtils.touch 'test_b.rb'
|
|
|
|
|
|
|
|
ARGV.replace %w[foo.rb test_*.rb -v]
|
|
|
|
|
2012-11-29 14:16:46 -05:00
|
|
|
load File.join(@rake_lib, 'rake/rake_test_loader.rb')
|
2011-06-27 22:45:29 -04:00
|
|
|
|
|
|
|
assert_equal %w[-v], ARGV
|
|
|
|
ensure
|
2013-10-11 17:35:01 -04:00
|
|
|
$:.replace orig_loaded_features
|
2011-06-27 22:45:29 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|