Forum: RSpec [Cucumber] Directory Layout

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ef0db53920b243d6758c2f6b1306df0d?d=identicon&s=25 Steve Ross (cwd)
on 2009-01-23 00:26
(Received via mailing list)
I had a relatively flat layout and wanted to group like features
together so I made it more hierarchical:

features/
   messaging/
     main_screen.feature
     message_page.feature
     steps/
       main_screen.rb
       messaging_steps.rb

This may be just my boneheadedness, but when I do:

cucumber features/messaging -r features/support/env.rb

These run, but none of the steps are matched. It seems the step
matchers are not expected to be where I put them.

Questions:

- Is there a more sensible layout?
- Is there an easier way than -r features/support/env.rb to get the
machinist plugin to load?

Thanks
5d38ab152e1e3e219512a9859fcd93af?d=identicon&s=25 David Chelimsky (Guest)
on 2009-01-23 00:47
(Received via mailing list)
On Thu, Jan 22, 2009 at 4:51 PM, s.ross <cwdinfo@gmail.com> wrote:
>
> This may be just my boneheadedness, but when I do:
>
> cucumber features/messaging -r features/support/env.rb

That ONLY loads features/support/env.rb and not any of the step
definition files. Try this:

cucumber features/messaging -r features
Ef0db53920b243d6758c2f6b1306df0d?d=identicon&s=25 Steve Ross (cwd)
on 2009-01-23 01:16
(Received via mailing list)
On Jan 22, 2009, at 3:38 PM, David Chelimsky wrote:

>>     main_screen.rb
>
>>
>> Thanks
>>

Yup. That was it. Thanks!
0be0e4aa42aacd9a8a95c792de273ca7?d=identicon&s=25 Aslak Hellesøy (aslakhellesoy)
on 2009-01-23 02:08
(Received via mailing list)
On Fri, Jan 23, 2009 at 1:05 AM, s.ross <cwdinfo@gmail.com> wrote:

>>>  main_screen.feature
>> That ONLY loads features/support/env.rb and not any of the step
>>>
>>> - Is there a more sensible layout?
>>> - Is there an easier way than -r features/support/env.rb to get the
>>> machinist plugin to load?
>>>
>>> Thanks
>>>
>>>
> Yup. That was it. Thanks!
>

Just to clarify..

If you pass *no* --require switches to cucumber, it will guess where to
find
.rb files to load
If you pass one or more it will stop guessing

Aslak
This topic is locked and can not be replied to.