2 require 'rspec/core/rake_task'
4 CLOBBER.include('coverage', 'specdoc')
7 RSpec::Core::RakeTask.new(:all) do |t|
10 desc 'Generate HTML Specdocs for all specs.'
11 RSpec::Core::RakeTask.new(:specdoc) do |t|
12 specdoc_path = File.expand_path('../../specdoc', __FILE__)
14 t.rspec_opts = %W( --format html --out #{File.join(specdoc_path, 'index.html')} )
15 t.fail_on_error = false
18 RSpec::Core::RakeTask.new(:rcov) do |t|
20 if `which rcov`.strip == ""
22 "Please install rcov and ensure that its binary is in the PATH:"
24 STDERR.puts("sudo gem install rcov")
32 --exclude lib/google/api_client/environment.rb,
44 RCov::VerifyTask.new(:verify) do |t|
46 t.index_html = 'coverage/index.html'
53 desc 'Browse the code coverage report.'
54 task :browse => 'spec:rcov' do
56 Launchy::Browser.run('coverage/index.html')
62 desc 'Alias to spec:rcov'
63 task 'spec' => 'spec:rcov'
65 desc 'Alias to spec:all'
66 task 'spec' => 'spec:all'