lib/testrbl.rb in testrbl-0.5.1 vs lib/testrbl.rb in testrbl-0.5.2
- old
+ new
@@ -22,11 +22,16 @@
run(ruby + load_options + line_pattern_option(file, line) + options)
else
if files.size == 1 and File.file?(files.first)
run(ruby + load_options + files + options)
elsif options.none? { |arg| arg =~ /^-n/ }
+ seed = if seed = options.index("--seed")
+ ["--"] + options.slice!(seed, 2)
+ else
+ []
+ end
files = files.map { |f| File.directory?(f) ? all_test_files_in(f) : f }.flatten
- run(ruby + load_options + files.map { |f| "-r#{f}" } + options + ["-e", ""])
+ run(ruby + load_options + files.map { |f| "-r#{f}" } + options + ["-e", ""] + seed)
else # pass though
# no bundle exec: projects with mini and unit-test do not run well via bundle exec testrb
run ["testrb"] + argv
end
end