Skip to content
Browse files

added rake task for tests

  • Loading branch information...
1 parent ed9d7c4 commit 420d27c3d97504a1f53e10c993e4d81ecd7763b9 sam committed
Showing with 18 additions and 1 deletion.
  1. +18 −1 Rakefile
View
19 Rakefile
@@ -2,8 +2,9 @@ require 'rubygems'
require 'rake'
class FailedCleanException < Exception;end
+class FailedTestException < Exception;end
-task :default => 'maintenance:all'
+task :default => 'test:all'
namespace :maintenance do
current_dir = File.dirname(__FILE__)
@@ -22,3 +23,19 @@ namespace :maintenance do
desc "run a full clean"
task :all => [ :clean ]
end
+
+namespace :test do
+
+ desc "run the test suite"
+ task :run do
+ test_result = %x{ruby test/ts_master.rb}
+ print test_result
+ if test_result.match(/error/i)
+ puts "test failed"
+ throw FailedTestException.new
+ end
+ end
+
+ desc "run all tests"
+ task :all => [ :run ]
+end

0 comments on commit 420d27c

Please sign in to comment.
Something went wrong with that request. Please try again.