[rspec-users] Parsing Variables from the RakeFile to spec_helper

Togetherne Togetherne lists at ruby-forum.com
Thu Nov 6 08:59:19 EST 2008

David Chelimsky wrote:
> Why not create different tasks? There's a few ways you can handle that
> and keep control from the command line.

Thanks for the reply, i have managed i think to get half way there!!:

@environment = ["*iehta", "*chrome"]

@environment.each {|browse|
desc("Run all tests in parallel using DeepTest.")
Spec::Rake::SpecTask.new("tests:run_in_parallel") do |t|
  puts "running test on #{browse}"
  t.spec_files = FileList['google*.rb']
  t.deep_test :number_of_workers => 2
           #   :timeout_in_seconds => 300
  t.spec_opts << '--color'
  t.spec_opts << "--require 
  t.spec_opts << 
  t.spec_opts << "--format=progress"
task :'tests:run_in_parallel' => :create_report

however everytime i run tests:run_in_parallel it runs the tests for 
*chrome twice!!?....

If i create a seperate rake task for each how would i chain them togethr 
to run 1 after eachother?
Posted via http://www.ruby-forum.com/.

More information about the rspec-users mailing list