2011-12-02 13:42:46 +00:00
|
|
|
require 'rake/clean'
|
2012-06-14 09:47:06 +00:00
|
|
|
require 'rspec/core/rake_task'
|
2011-12-02 13:42:46 +00:00
|
|
|
|
|
|
|
CLOBBER.include('coverage', 'specdoc')
|
2010-07-28 19:30:56 +00:00
|
|
|
|
|
|
|
namespace :spec do
|
2012-06-14 09:18:35 +00:00
|
|
|
RSpec::Core::RakeTask.new(:all) do |t|
|
2012-07-21 09:19:16 +00:00
|
|
|
t.pattern = FileList['spec/**/*_spec.rb']
|
|
|
|
t.rspec_opts = ['--color', '--format', 'documentation']
|
2012-06-14 09:18:35 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
desc 'Generate HTML Specdocs for all specs.'
|
|
|
|
RSpec::Core::RakeTask.new(:specdoc) do |t|
|
|
|
|
specdoc_path = File.expand_path('../../specdoc', __FILE__)
|
|
|
|
|
|
|
|
t.rspec_opts = %W( --format html --out #{File.join(specdoc_path, 'index.html')} )
|
|
|
|
t.fail_on_error = false
|
|
|
|
end
|
2010-07-28 19:30:56 +00:00
|
|
|
end
|
|
|
|
|
2014-08-14 15:54:16 +00:00
|
|
|
desc 'Alias to spec:all'
|
|
|
|
task 'spec' => 'spec:all'
|