On Wed, Nov 26, 2008 at 3:42 PM, James Byrne <[EMAIL PROTECTED]> 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 > [email protected] > http://rubyforge.org/mailman/listinfo/rspec-users >
_______________________________________________ rspec-users mailing list [email protected] http://rubyforge.org/mailman/listinfo/rspec-users
