Cucumber + Rcov wrong command syntax

72 views
Skip to first unread message

Everton Moreth

unread,
Sep 12, 2011, 1:48:23 AM9/12/11
to cu...@googlegroups.com
Hi there, 
I ran out of ideas on how to solve this :
(Relevant) Gem list:
cucumber (0.10.7)
cucumber-rails (0.4.1)
bundler (1.0.18)
rails (3.1.0)

I have a custom rake file as following:

require 'cucumber/rake/task'
namespace :cucumber do
  Cucumber::Rake::Task.new(:rcov => 'db:test:prepare') do |t|
      t.rcov = true
      t.rcov_opts = %w{--rails --exclude osx\/objc,gems\/,spec\/,features\/,app\/models\/}
      t.rcov_opts << %[--out="features_rcov"]
      t.profile = 'default'
      t.cucumber_opts = '--format html --out cucumber_test.html'
    end
end

But when I try to run rake cucumber:rcov it shows:
rake cucumber:rcov FEATURE=path/to/the/file.feature

/home/emoreth/.rvm/rubies/ruby-1.8.7-p330/bin/ruby -S bundle exec rcov --rails --exclude osx\/objc,gems\/,spec\/,features\/,app\/models\/ --out="features_rcov" "/home/emoreth/.rvm/gems/ruby-1.8.7-p330@project/gems/cucumber-0.10.7/bin/cucumber" -- --format html --out cucumber_test.html --profile default path/to/the/file.feature

Using the default profile...
WARNING: No DRb server is running. Running features locally
#encoding: utf-8
#language: pt
Funcionalidade: Listagem de cursos
  Stuff
  More stuff
  Even more stuff

  Contexto:                                                                              
    Step 1 
    Step 2                                                
    Step 3

0 scenarios
3 steps (3 passed)
0m1.614s
No DRb server is running. Running in local process instead ...
/home/emoreth/.rvm/gems/ruby-1.8.7-p330@sispos_novo/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:234:in `load': no such file to load -- /home/emoreth/www/rails/project/default (LoadError)


It is trying to load default as a file.... If i remove the default profile, it tries to parse "Funcionalidade:" as a ruby command: 

/home/emoreth/.rvm/gems/ruby-1.8.7-p330@project/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:234:in `load': /home/emoreth/www/rails/project/features/path/to/the/file.feature:3: syntax error, unexpected ':', expecting $end (SyntaxError)
Funcionalidade: Listagem de cursos
                     ^
from /home/emoreth/.rvm/gems/ruby-1.8.7-p330@sispos_novo/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:234:in `load'



No problem if not running rcov...


Any help ?

Regards,

EMoreth

EMoreth

unread,
Sep 13, 2011, 6:46:24 PM9/13/11
to Cukes

aslak hellesoy

unread,
Sep 13, 2011, 8:08:53 PM9/13/11
to cu...@googlegroups.com


On Tue, Sep 13, 2011 at 11:46 PM, EMoreth <everton...@gmail.com> wrote:
Hi there,

Have you tried the latest versions?
 
I ran out of ideas on how to solve this :
(Relevant) Gem list:
cucumber (0.10.7)

1.0.6
 
cucumber-rails (0.4.1)

1.0.4
 

--
You received this message because you are subscribed to the Google Groups "Cukes" group.
To post to this group, send email to cu...@googlegroups.com.
To unsubscribe from this group, send email to cukes+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cukes?hl=en.


Everton Moreth

unread,
Sep 14, 2011, 3:53:14 PM9/14/11
to cu...@googlegroups.com
*** LOCAL GEMS ***

capybara (1.1.1)
cucumber (1.0.6)
cucumber-rails (1.0.5)
gherkin (2.4.18)
metric_fu (2.1.1)
metrical (0.0.7)
rails (3.1.0)
rcov (0.9.10)


Updated half of my test environment, but the error keeps the same:

emoreth@emoreth-laptop:$ rake cucumber:rcov
/home/emoreth/.rvm/rubies/ruby-1.8.7-p330/bin/ruby -S bundle exec rcov --rails --exclude osx\/objc,gems\/,spec\/,features\/,app\/models\/ --out="features_rcov" "/home/emoreth/.rvm/gems/ruby-1.8.7-p330@project/gems/cucumber-1.0.6/bin/cucumber" -- --format html --out cucumber_test.html --profile default

/home/emoreth/.rvm/gems/ruby-1.8.7-p330@project/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:234:in `load': no such file to load -- /home/emoreth/www/rails/project/default (LoadError)


Everton Moreth

Everton Moreth

unread,
Sep 16, 2011, 5:53:50 PM9/16/11
to cu...@googlegroups.com
Any help ??

I already spent two days running on circles...

I found the rcov is using RSpec::Core::Runner (in some way) to load files. Rspec is not even required in rcov gem...

Ill try talking to the rcov guys.

Everton Moreth

aslak hellesoy

unread,
Sep 16, 2011, 6:02:42 PM9/16/11
to cu...@googlegroups.com
On Fri, Sep 16, 2011 at 10:53 PM, Everton Moreth <everton...@gmail.com> wrote:
Any help ??

I already spent two days running on circles...

I found the rcov is using RSpec::Core::Runner (in some way) to load files. Rspec is not even required in rcov gem...

Ill try talking to the rcov guys.


Haven't had time to look into this. Have you verified that cucumber still obeys rcov's command line API?

Everton Moreth

unread,
Sep 16, 2011, 8:22:17 PM9/16/11
to cu...@googlegroups.com
Yep, 

The issue is with RSpec. If I comment out rspec/rspec-rails from my Gemfile, rcov works ok.
With rspec, error!

Everton Moreth

Everton Moreth

unread,
Sep 19, 2011, 5:21:30 PM9/19/11
to cu...@googlegroups.com
Im not really sure why, but adding --replace-progname to rcov seems to fix the problem.

EMoreth
Reply all
Reply to author
Forward
0 new messages