Permalink
Switch branches/tags
Find file
Fetching contributors…
Cannot retrieve contributors at this time
36 lines (29 sloc) 836 Bytes
require 'rake'
require 'rake/rdoctask'
require 'spec/rake/spectask'
begin
require 'sdoc_helpers'
rescue LoadError
puts "sdoc support not enabled. Please gem install sdoc-helpers."
end
desc 'Default: run specs with rcov.'
task :default => :rcov_spec
desc 'Run the specs'
Spec::Rake::SpecTask.new(:spec) do |t|
t.spec_opts = ['--colour --format progress --loadby mtime --reverse']
t.spec_files = FileList['spec/**/*_spec.rb']
end
desc 'Run the specs with rcov'
Spec::Rake::SpecTask.new("rcov_spec") do |t|
t.spec_files = FileList['spec/**/*_spec.rb']
t.spec_opts = ['--color']
t.rcov = true
t.rcov_opts = ['--exclude', '^spec,/gems/']
end
Rake::RDocTask.new do |t|
t.rdoc_dir = 'doc'
t.rdoc_files.include('lib/**/*.rb')
t.options << '--inline-source'
t.options << '--all'
t.options << '--line-numbers'
end