diff options
author | murphy <murphy@rubychan.de> | 2010-06-29 06:32:30 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2010-06-29 06:32:30 +0000 |
commit | 93dfad17309f46d00d1043592efdb282d13963fe (patch) | |
tree | 60cbfc2fbc3497f95f5d02de1e9ec8c7b10515ff /rake_tasks/test.rake | |
parent | 87764c224cc8c808688e83d7c1f93c8dbbbd9b4f (diff) | |
download | coderay-93dfad17309f46d00d1043592efdb282d13963fe.tar.gz |
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.
Diffstat (limited to 'rake_tasks/test.rake')
-rw-r--r-- | rake_tasks/test.rake | 26 |
1 files changed, 25 insertions, 1 deletions
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 |