test_browser.rake 490 B

1234567891011121314151617181920
  1. $LOAD_PATH << './lib'
  2. require 'rubygems'
  3. namespace :test do
  4. desc 'Start browser tests'
  5. task :browser, [:opts] => :environment do |_t, args|
  6. start = Time.zone.now
  7. if !args.opts
  8. args.opts = ''
  9. end
  10. Dir.glob('test/browser/*_test.rb').sort.each { |r|
  11. sh "#{args.opts} ruby -Itest #{r}" do |ok, res|
  12. raise 'Failed test. ' + res.inspect if !ok
  13. end
  14. }
  15. puts 'All browser tests, elapsed: ' + (Time.zone.now - start).to_s + ' seconds'
  16. end
  17. end