From 63ffdbf62ac8dbf924689c1e7cffb9221da1fd99 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sun, 24 Feb 2013 00:06:32 +0100 Subject: [PATCH] Added rake test:browser task. --- lib/tasks/test_browser.rake | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 lib/tasks/test_browser.rake diff --git a/lib/tasks/test_browser.rake b/lib/tasks/test_browser.rake new file mode 100644 index 000000000..c19d580df --- /dev/null +++ b/lib/tasks/test_browser.rake @@ -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