From 93dfad17309f46d00d1043592efdb282d13963fe Mon Sep 17 00:00:00 2001 From: murphy Date: Tue, 29 Jun 2010 06:32:30 +0000 Subject: Added lots of unit tests. Theses actually come from the library files; now they are included. Also, rake test and test:all don't test the scanners now; you have to start them using rake test:scanners. --- rake_tasks/test.rake | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'rake_tasks') diff --git a/rake_tasks/test.rake b/rake_tasks/test.rake index 661c47b..a01ee0c 100644 --- a/rake_tasks/test.rake +++ b/rake_tasks/test.rake @@ -27,6 +27,28 @@ namespace :test do end end + desc 'run unit tests' + task :units do + ENV['check_rubygems'] = 'true' + ruby './test/unit/suite.rb' + end + + namespace :units do + desc 'run all unit tests on all supported Ruby platforms' + task :all do + $stdout.sync = true + for task in %w(test:units 187 test:units ee test:units 19 test:units 191 test:units jruby test:units) + if task == 'test:units' + puts "\n\nTesting with #{RUBY}..." + Rake::Task['test:units'].reenable + Rake::Task['test:units'].invoke + else + Rake::Task[task].invoke + end + end + end + end + desc 'run all scanner tests' task :scanners do ruby "./test/scanners/suite.rb" @@ -67,7 +89,9 @@ namespace :test do print "\n\nTesting with " ruby '-v' Rake::Task['test'].reenable + Rake::Task['test:exe'].reenable Rake::Task['test:functional'].reenable + Rake::Task['test:units'].reenable Rake::Task['test:scanners'].reenable Rake::Task['test'].invoke else @@ -83,5 +107,5 @@ namespace :test do end -task :test => %w( test:functional test:exe test:scanners ) +task :test => %w( test:functional test:exe test:units ) task :samples => 'test:samples' \ No newline at end of file -- cgit v1.2.1