Browse files

use Rake's test runner

  • Loading branch information...
1 parent 3cc6357 commit 15c7d3f3c6249c3beaa1d97a1eab77e1cabe077c @rtomayko committed Dec 13, 2009
Showing with 5 additions and 7 deletions.
  1. +5 −7 Rakefile
View
12 Rakefile
@@ -1,3 +1,4 @@
+require 'rake/testtask'
task :default => :test
# SPECS =====================================================================
@@ -7,13 +8,10 @@ task :rcov do
sh "rcov -Ilib:test test/*_test.rb"
end
-desc 'Run specs with unit test style output'
-task :test do |t|
- if system('type turn >/dev/null 2>&1')
- sh 'turn -Ilib test/*_test.rb'
- else
- sh 'testrb -Ilib -rubygems test/*_test.rb'
- end
+desc 'Run tests (default)'
+Rake::TestTask.new(:test) do |t|
+ t.test_files = FileList['test/*_test.rb']
+ t.ruby_opts = ['-rubygems'] if defined? Gem
end
# PACKAGING =================================================================

0 comments on commit 15c7d3f

Please sign in to comment.