summaryrefslogtreecommitdiff
path: root/rake_tasks
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2009-01-13 16:04:11 +0000
committermurphy <murphy@rubychan.de>2009-01-13 16:04:11 +0000
commit594c034dd51b7955a8ab7828bf8030abee027801 (patch)
treee5c5047e3f4d2a6fa1d84fa53a2425fe2232ed9a /rake_tasks
parent0d7f739e63c94154860697aa94862275bd59168a (diff)
downloadcoderay-594c034dd51b7955a8ab7828bf8030abee027801.tar.gz
Added test:all rake task for testing CodeRay on all platforms.
Diffstat (limited to 'rake_tasks')
-rw-r--r--rake_tasks/test.rake69
1 files changed, 43 insertions, 26 deletions
diff --git a/rake_tasks/test.rake b/rake_tasks/test.rake
index 1033565..20f32d8 100644
--- a/rake_tasks/test.rake
+++ b/rake_tasks/test.rake
@@ -1,26 +1,43 @@
-namespace :test do
- desc 'run all sample tests'
- task :samples do
- ruby "./sample/suite.rb"
- end
-
- desc 'run functional tests'
- task :functional do
- ruby "./test/functional/suite.rb"
- end
-
- desc 'run all scanner tests'
- task :scanners do
- ruby "./test/scanners/suite.rb"
- end
-
- desc 'clean test output files'
- task :clean do
- for file in Dir['test/scanners/**/*.actual.*']
- rm file
- end
- end
-end
-
-task :test => %w( test:functional test:scanners )
-task :samples => 'test:samples'
+namespace :test do
+ desc 'run all sample tests'
+ task :samples do
+ ruby "./sample/suite.rb"
+ end
+
+ desc 'run functional tests'
+ task :functional do
+ ruby "./test/functional/suite.rb"
+ end
+
+ desc 'run all scanner tests'
+ task :scanners do
+ ruby "./test/scanners/suite.rb"
+ end
+
+ desc 'clean test output files'
+ task :clean do
+ for file in Dir['test/scanners/**/*.actual.*']
+ rm file
+ end
+ end
+
+ desc 'run all tests on all supported Ruby platforms'
+ task :all do
+ $stdout.sync = true
+ for task in %w(test 19 test jruby test ee test)
+ if task == 'test'
+ puts "\n\nTesting with #{RUBY}..."
+ Rake::Task['test'].reenable
+ Rake::Task['test:functional'].reenable
+ Rake::Task['test:scanners'].reenable
+ Rake::Task['test'].invoke
+ else
+ Rake::Task[task].invoke
+ end
+ end
+ end
+
+end
+
+task :test => %w( test:functional test:scanners )
+task :samples => 'test:samples'