2016-08-06 17:28:46 +00:00
|
|
|
require "rake/testtask"
|
2004-11-24 01:04:44 +00:00
|
|
|
|
|
|
|
desc "Default Task"
|
2012-10-07 17:54:14 +00:00
|
|
|
task default: [ :test ]
|
2004-11-24 01:04:44 +00:00
|
|
|
|
2016-01-31 18:01:03 +00:00
|
|
|
task :package
|
|
|
|
|
2004-11-24 01:04:44 +00:00
|
|
|
# Run the unit tests
|
|
|
|
Rake::TestTask.new { |t|
|
|
|
|
t.libs << "test"
|
2016-08-06 17:28:46 +00:00
|
|
|
t.pattern = "test/**/*_test.rb"
|
2009-11-10 05:42:17 +00:00
|
|
|
t.warning = true
|
2012-02-03 13:01:24 +00:00
|
|
|
t.verbose = true
|
2014-09-27 14:37:44 +00:00
|
|
|
t.ruby_opts = ["--dev"] if defined?(JRUBY_VERSION)
|
2004-11-24 01:04:44 +00:00
|
|
|
}
|
|
|
|
|
2009-11-11 00:50:15 +00:00
|
|
|
namespace :test do
|
|
|
|
task :isolated do
|
2010-01-24 18:36:42 +00:00
|
|
|
Dir.glob("test/**/*_test.rb").all? do |file|
|
2016-08-06 17:28:46 +00:00
|
|
|
sh(Gem.ruby, "-w", "-Ilib:test", file)
|
2016-09-01 21:41:49 +00:00
|
|
|
end || raise("Failures")
|
2009-11-11 00:50:15 +00:00
|
|
|
end
|
2009-05-13 08:10:37 +00:00
|
|
|
end
|