Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
27 lines (22 sloc) 415 Bytes
require 'rake/testtask'
require 'rake/rdoctask'
def command?(command)
system("type #{command} > /dev/null")
end
#
# Tests
#
task :default => :test
if command? :turn
desc "Run tests"
task :test do
suffix = "-n #{ENV['TEST']}" if ENV['TEST']
sh "turn test/*.rb #{suffix}"
end
else
Rake::TestTask.new do |t|
t.libs << 'lib'
t.pattern = 'test/**/*_test.rb'
t.verbose = false
end
end