google-api-ruby-client/tasks/spec.rake

23 lines
598 B
Ruby
Raw Normal View History

require 'rake/clean'
require 'rspec/core/rake_task'
CLOBBER.include('coverage', 'specdoc')
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
end
desc 'Alias to spec:all'
task 'spec' => 'spec:all'