1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
require "bundler/gem_tasks"
# Run test by default.
task default: :test
task test: %i[testunit spec]
require 'rake/testtask'
Rake::TestTask.new(:testunit) do |t|
t.libs = %w[lib test]
t.pattern = "test/**/*_test.rb"
t.verbose = !ENV["VERBOSE"].nil?
t.warning = !ENV["WARNING"].nil?
end
require "rubocop/rake_task"
RuboCop::RakeTask.new
require 'rspec/core/rake_task'
begin
require 'fuubar'
rescue LoadError
end
RSpec::Core::RakeTask.new do |t|
t.verbose = !!ENV["VERBOSE"]
t.rspec_opts = []
t.rspec_opts << ['--format', 'Fuubar'] if defined?(Fuubar)
end
require 'yard/rake/yardoc_task'
YARD::Rake::YardocTask.new(:yardoc) do |y|
y.options = ["--output-dir", "yardoc"]
end
CLOBBER.include "yardoc"
|