Sha256: b0df26d8737d7b9734dca93fc06971d455f425e566227a358fbff9d80928f56d
Contents?: true
Size: 884 Bytes
Versions: 1
Compression:
Stored size: 884 Bytes
Contents
require 'cucumber/rake/task' #I have to add this require 'spec/rake/spectask' namespace :rcov do Cucumber::Rake::Task.new(:cucumber) 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 Spec::Rake::SpecTask.new(:rspec) do |t| t.spec_opts = ['--options', "\"#{RAILS_ROOT}/spec/spec.opts\""] t.spec_files = FileList['spec/**/*_spec.rb'] t.rcov = true t.rcov_opts = lambda do IO.readlines("#{RAILS_ROOT}/spec/rcov.opts").map {|l| l.chomp.split " "}.flatten end 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:rspec"].invoke Rake::Task["rcov:cucumber"].invoke system "open coverage/index.html" end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
base_rails_app-0.0.1 | lib/lib/tasks/rcov.rake |