[rspec-users] Cucumber and Rcov

James Byrne lists at ruby-forum.com
Wed Dec 3 22:04:26 EST 2008

I am now trying to get rcov to work for me, without much success.  I
stole the rake task code from the cucumber site:

desc "Run all features"
task :features => "features:all"
task :features => 'db:test:prepare'
require 'cucumber/rake/task' #I have to add this -mischa

namespace :features do
  Cucumber::Rake::Task.new(:all) do |t|
    t.cucumber_opts = "--format pretty"

  Cucumber::Rake::Task.new(:cruise) do |t|
    t.cucumber_opts = "--format pretty
--out=#{ENV['CC_BUILD_ARTIFACTS']}/features.txt --format html
    t.rcov = true
    t.rcov_opts = %w{--rails --exclude osx\/objc,gems\/,spec\/}
    t.rcov_opts << %[-o "#{ENV['CC_BUILD_ARTIFACTS']}/features_rcov"]

  Cucumber::Rake::Task.new(:rcov) do |t|
    t.rcov = true
    t.rcov_opts = %w{--rails --exclude osx\/objc,gems\/,spec\/}
    t.rcov_opts << %[-o "features_rcov"]

To be frank, I haven't a clue about whatever this does.  It seems to
have little in common with other suggested rake tasks for rcov thaat I
have found.

In any case, given a cucumber.rake file containign the foregoing, when I
run $ rake features:rcov I obtain the same results as when I ran the
original rake features task.  I need someone to explain to me how to get
this piece properly configured and working.
Posted via http://www.ruby-forum.com/.

More information about the rspec-users mailing list