You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Cukes
Hi,
User is available in console in both test and development
environments.
But for some reason I get a NameError when running script/cucumber.
$ script/cucumber features/step_definitions/
main_view_descriptions.feature
And I´m logged in as a user # features/
step_definitions/main_view_steps.rb:5
uninitialized constant User (NameError)
./features/step_definitions/main_view_steps.rb:6:in `/^I0264m
logged in as a user$/'
features/step_definitions/main_view_descriptions.feature:8:in
`And I´m logged in as a user'
## main_view_steps.rb
Given /^I´m logged in as a user$/ do
@user = User.create(:name => "martin")
end
Any idea what might be wrong? Cucumber works in test-environment,
right?
Cheers,
Martins
aslak hellesoy
unread,
Aug 1, 2009, 5:41:39 AM8/1/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to cu...@googlegroups.com
Hi,
User is available in console in both test and development
environments.
But for some reason I get a NameError when running script/cucumber.
$ script/cucumber features/step_definitions/
You have features under step_definitions? Only ruby files are supposed to go there. When you run like this, nothing under features/support will get loaded (and therefore not even Rails gets loaded, and none of stuff under app)
Move all your feature files to features/*feature and you should be fine.
See --help for --require for details.
HTH, Aslak
If you have a recent setup of cucumber you should have a "cucumber" environment that uses the same db as the "test" db, but that sounds unrelated to your problem.
Cheers,
Martins
martins
unread,
Aug 1, 2009, 6:17:24 AM8/1/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Cukes
On Aug 1, 11:41 am, aslak hellesoy <aslak.helle...@gmail.com> wrote:
>
> You have features under step_definitions? Only ruby files are supposed to go
> there. When you run like this, nothing under features/support will get
> loaded (and therefore not even Rails gets loaded, and none of stuff under
> app)
>
> Move all your feature files to features/*feature and you should be fine.
Yeah, that was it!
Thanks for the swift feeback! :)