forked from redbooth/teambox
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5a62f12
commit 4dedcea
Showing
1 changed file
with
22 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,26 @@ | ||
require 'cucumber/rake/task' | ||
require 'rspec/core/rake_task' | ||
unless Teambox.config.heroku? | ||
require 'cucumber/rake/task' | ||
require 'rspec/core/rake_task' | ||
|
||
namespace :rcov do | ||
Cucumber::Rake::Task.new(:cucumber_run) do |t| | ||
t.rcov = true | ||
t.rcov_opts = %w{--rails --exclude osx\/objc,gems\/,spec\/,features\/ --aggregate coverage.data} | ||
t.rcov_opts << %[-o "coverage"] | ||
end | ||
namespace :rcov do | ||
Cucumber::Rake::Task.new(:cucumber_run) do |t| | ||
t.rcov = true | ||
t.rcov_opts = %w{--rails --exclude osx\/objc,gems\/,spec\/,features\/ --aggregate coverage.data} | ||
t.rcov_opts << %[-o "coverage"] | ||
end | ||
|
||
RSpec::Core::RakeTask.new(:rspec_run) do |t| | ||
t.pattern = 'spec/**/*_spec.rb' | ||
t.rcov = true | ||
t.rcov_opts = %w{--rails --exclude osx\/objc,gems\/,spec\/,features\/ --aggregate coverage.data} | ||
t.rcov_opts << %[-o "coverage"] | ||
end | ||
RSpec::Core::RakeTask.new(:rspec_run) do |t| | ||
t.pattern = 'spec/**/*_spec.rb' | ||
t.rcov = true | ||
t.rcov_opts = %w{--rails --exclude osx\/objc,gems\/,spec\/,features\/ --aggregate coverage.data} | ||
t.rcov_opts << %[-o "coverage"] | ||
end | ||
|
||
desc "Run both specs and features to generate aggregated coverage" | ||
task :all do |t| | ||
rm "coverage.data" if File.exist?("coverage.data") | ||
Rake::Task["rcov:cucumber_run"].invoke | ||
Rake::Task["rcov:rspec_run"].invoke | ||
desc "Run both specs and features to generate aggregated coverage" | ||
task :all do |t| | ||
rm "coverage.data" if File.exist?("coverage.data") | ||
Rake::Task["rcov:cucumber_run"].invoke | ||
Rake::Task["rcov:rspec_run"].invoke | ||
end | ||
end | ||
end | ||
end |