[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|
ENV['SELENIUM_RC_BROWSER'] = browse
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
'rubygems,selenium/rspec/reporting/selenium_test_report_formatter'"
t.spec_opts <<
"--format=Selenium::RSpec::SeleniumTestReportFormatter:./tmp/test_report.html"
t.spec_opts << "--format=progress"
end
}
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