lib/parallel_tests/tasks.rb in parallel_tests-0.6.19 vs lib/parallel_tests/tasks.rb in parallel_tests-0.6.20
- old
+ new
@@ -1,9 +1,9 @@
namespace :parallel do
def run_in_parallel(cmd, options)
- count = (options[:count] ? options[:count].to_i : nil)
+ count = "-n #{options[:count]}" if options[:count]
executable = File.join(File.dirname(__FILE__), '..', '..', 'bin', 'parallel_test')
- command = "#{executable} --exec '#{cmd}' -n #{count} #{'--non-parallel' if options[:non_parallel]}"
+ command = "#{executable} --exec '#{cmd}' #{count} #{'--non-parallel' if options[:non_parallel]}"
abort unless system(command)
end
desc "create test databases via db:create --> parallel:create[num_cpus]"
task :create, :count do |t,args|