[rspec-users] Rake features vs. cucumber features
aslak hellesoy
aslak.hellesoy at gmail.com
Wed Nov 26 09:53:25 EST 2008
On Wed, Nov 26, 2008 at 3:42 PM, James Byrne <lists at ruby-forum.com> wrote:
> 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:
>
> features
> |-- 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?
>
Short answer:
http://rspec.lighthouseapp.com/projects/16211-cucumber/tickets/106--verbose-showing-loaded-files
When this is implemented it will be easier to diagnose and fix problems like
this. It will give you a hint about other --require options you might want
to add.
Cheers,
Aslak
>
> Features:
>
> Scenario: Record Entity basic identification information #
> features/entities/entity.feature:12
> Given I have a party to some business transaction #
> features/entities/step_definitions/entity_steps.rb:7
> 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'
>
>
> Steps:
>
> Given /a party to some business transaction/ do
> @party = Entity.new
> end
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20081126/3a4be120/attachment.html>
More information about the rspec-users
mailing list