[rspec-users] Rake features vs. cucumber features

James Byrne lists at ruby-forum.com
Wed Nov 26 09:42:01 EST 2008

What exactly is the difference between these two invocations, beside the
fact that one is a rake task and one loads and runs the gem directly?  I
am getting a slew of errors when I run "# cucumber features" whereas "#
rake features" passes all the tests.

I have manually run "#rake db:test:prepare" but nonetheless I am getting
an error regarding a "uninitialized constant Entity (NameError)."

The features directory looks like this:

|-- entities
|   |-- entity.feature
|   `-- step_definitions
|       `-- entity_steps.rb
|-- locations
|   `-- step_definitions
|-- sites
|   `-- step_definitions
|-- step_definitions
|   `-- webrat_steps.rb
`-- support
    `-- env.rb

Is there something that I must add to the cucumber parameters when
calling it directly to get this to work as I require? Like, maybe,
requiring rails or some other library?


Scenario: Record Entity basic identification information  #
    Given I have a party to some business transaction       #
      uninitialized constant Entity (NameError)
      ./features/entities/step_definitions/entity_steps.rb:8:in `Given
/a party to some business transaction/'
      features/entities/entity.feature:14:in `Given I have a party to
some business transaction'


Given /a party to some business transaction/ do
  @party = Entity.new
Posted via http://www.ruby-forum.com/.

More information about the rspec-users mailing list