Added rake test:browser task.
This commit is contained in:
parent
e35ac9b468
commit
63ffdbf62a
1 changed files with 20 additions and 0 deletions
20
lib/tasks/test_browser.rake
Normal file
20
lib/tasks/test_browser.rake
Normal file
|
@ -0,0 +1,20 @@
|
|||
$LOAD_PATH << './lib'
|
||||
require 'rubygems'
|
||||
|
||||
namespace :test do
|
||||
desc "Start browser tests"
|
||||
task :browser, [:opts] => :environment do |t, args|
|
||||
|
||||
start = Time.now()
|
||||
if !args.opts
|
||||
args.opts = ''
|
||||
end
|
||||
Dir.glob('test/browser/*_test.rb').each { |r|
|
||||
sh "#{args.opts} ruby -Itest #{r}" do |ok, res|
|
||||
raise "Failed test. " + res.inspect if !ok
|
||||
end
|
||||
}
|
||||
puts "All browser tests, elapsed: " + (Time.now() - start).to_s + " seconds"
|
||||
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue