Forum: RSpec Cucumber "standard base" setup?

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.
William T. (Guest)
on 2008-10-18 04:42
(Received via mailing list)
I'm trying to set up cucumber so we can try it in some Ruby automation
scripts I'm working on. These will be straight Ruby, for use in BBEdit
and TextMate (on the Mac).

NOT Rails.

The big early-stage stumbling block I'm having is setting up the
initial Rakefile and directory structure. I think I'm rtfm'ing, but
clearly I'm missing whatever I need to get past square one.

We'll be working on Leopard boxes, with clean and up-to-date gem
installs across the board. Most of our coding is in TextMate, and the
cucumber gem works AOK already. All the gems seem to be here, and the
example files in the cucumber repository work as expected.

But I'm not understanding what a minimal setup for a NEW project
should be.

* I need a Rakefile... but with what exactly in it? Many of the
examples are different, and at least a few fail to run on my box (but
that's external dependencies). What's the bare minimum I need to have
in a plain, empty Rakefile?
* A cucumber.yml file, which as I understand it is only needed if I
want to set params away from defaults.
* A "fixtures" directory... but with what necessary subdirectories in
it?
* A "lib" directory sometimes... but not in all examples?

Am I missing a simple generator script somewhere in the base cucumber
install? NOT for Rails -- just for a plain Ruby project?

Thanks very much. Again, all I'd really like to do is see a noobs'
walkthrough like:
(1) create an empty project directory
(2) build standard directory tree
(3) clone in standard Rakefile
(4) get started speccing.

(2) and (3) are my problem.

Thanks much!
-----
Bill Tozier
AIM:removed_email_address@domain.invalid • Twitter:Vaguery
http://williamtozier.com/slurry

"The brotherhood of man is not a mere poet's dream; it is a most
depressing and humiliating reality."
   -- Oscar Wilde
William T. (Guest)
on 2008-10-18 08:35
(Received via mailing list)
On Oct 17, 2008, at 8:34 PM, William T. wrote:

> * A "fixtures" directory... but with what necessary subdirectories
> in it?

Sorry. Meant "features" directory.
-----
Bill Tozier
AIM:removed_email_address@domain.invalid • Twitter:Vaguery
http://williamtozier.com/slurry

"The brotherhood of man is not a mere poet's dream; it is a most
depressing and humiliating reality."
   -- Oscar Wilde
aslak hellesoy (Guest)
on 2008-10-18 10:57
(Received via mailing list)
On Sat, Oct 18, 2008 at 2:34 AM, William T. 
<removed_email_address@domain.invalid>
wrote:
> We'll be working on Leopard boxes, with clean and up-to-date gem installs
> across the board. Most of our coding is in TextMate, and the cucumber gem
> works AOK already. All the gems seem to be here, and the example files in
> the cucumber repository work as expected.
>
> But I'm not understanding what a minimal setup for a NEW project should be.
>
> * I need a Rakefile... but with what exactly in it? Many of the examples are
> different, and at least a few fail to run on my box (but that's external
> dependencies). What's the bare minimum I need to have in a plain, empty
> Rakefile?

This:
http://github.com/aslakhellesoy/cucumber/tree/mast...

> * A cucumber.yml file, which as I understand it is only needed if I want to
> set params away from defaults.

You don't need that - I've removed it from the Calculator example
since it might be confusing for newcomers.

> * A "fixtures" directory... but with what necessary subdirectories in it?

features/
+--*.features
+--steps/
    +--*_steps.rb

> * A "lib" directory sometimes... but not in all examples?

Using lib is just a Ruby/Ruby gems convention. You should adjust your
$LOAD_PATH to include it.
Some examples are simple, so they have the code straight in the steps
file. I thought it was obvious that this is not what you'd do on a
real project, but rather stick it in lib like 98% of all other Ruby
projects do.

>
> Am I missing a simple generator script somewhere in the base cucumber
> install? NOT for Rails -- just for a plain Ruby project?
>

There is none - you're the first to ask for it.

> Thanks very much. Again, all I'd really like to do is see a noobs'
> walkthrough like:
> (1) create an empty project directory
> (2) build standard directory tree
> (3) clone in standard Rakefile
> (4) get started speccing.
>
> (2) and (3) are my problem.
>

Please file individual tickets for things you're missing (docs,
generator) and someone will hopefully get to it.

Aslak
William T. (Guest)
on 2008-10-18 15:37
(Received via mailing list)
On Oct 18, 2008, at 2:45 AM, aslak hellesoy wrote:

> This: http://github.com/aslakhellesoy/cucumber/tree/mast...
This was the one I had cut-and-pasted in a hand-cooked project that
acytually ran, but it might be useful to have some prescriptive word-
based infrastructure somewhere that says so. Will ticket it.

>> Am I missing a simple generator script somewhere in the base cucumber
>> install? NOT for Rails -- just for a plain Ruby project?
>>

> Please file individual tickets for things you're missing (docs,
> generator) and someone will hopefully get to it.

Will do. AOK here now. Thanks.
-----
Bill Tozier
AIM:removed_email_address@domain.invalid • Twitter:Vaguery
http://williamtozier.com/slurry

"The brotherhood of man is not a mere poet's dream; it is a most
depressing and humiliating reality."
   -- Oscar Wilde
This topic is locked and can not be replied to.