2017-07-16 13:11:16 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-08-06 13:28:46 -04:00
|
|
|
require "rake/testtask"
|
2008-05-16 01:29:55 -04:00
|
|
|
|
2016-08-06 13:37:12 -04:00
|
|
|
task default: :test
|
2008-06-28 02:29:47 -04:00
|
|
|
|
2016-01-31 13:01:03 -05:00
|
|
|
task :package
|
|
|
|
|
2009-10-16 14:56:59 -04:00
|
|
|
Rake::TestTask.new do |t|
|
2010-02-28 19:26:00 -05:00
|
|
|
t.libs << "test"
|
2019-12-16 11:55:06 -05:00
|
|
|
t.test_files = FileList["#{__dir__}/test/cases/**/*_test.rb"]
|
2009-09-05 20:10:21 -04:00
|
|
|
t.warning = true
|
2012-02-03 08:01:24 -05:00
|
|
|
t.verbose = true
|
2014-09-27 10:37:44 -04:00
|
|
|
t.ruby_opts = ["--dev"] if defined?(JRUBY_VERSION)
|
2008-06-28 02:29:47 -04:00
|
|
|
end
|
2009-08-31 20:09:16 -04:00
|
|
|
|
2009-11-10 19:50:15 -05:00
|
|
|
namespace :test do
|
|
|
|
task :isolated do
|
2017-05-15 10:17:28 -04:00
|
|
|
Dir.glob("#{__dir__}/test/**/*_test.rb").all? do |file|
|
|
|
|
sh(Gem.ruby, "-w", "-I#{__dir__}/lib", "-I#{__dir__}/test", file)
|
2016-09-01 17:41:49 -04:00
|
|
|
end || raise("Failures")
|
2009-11-10 19:50:15 -05:00
|
|
|
end
|
2009-05-13 04:10:37 -04:00
|
|
|
end
|