Getting started - very much a beginner

A hope my ignorance is acceptable here. I have, to this point,
programmed in Ruby mostly using my awareness of procedural programming;
I’ve written a small number of very useful programs for myself. I’m
starting to use classes now - just starting.

I have a small project I’m working on - setting up a database based on
the directed acyclic graph (DAG) model (using Ruby only). I’m been
studying test-directed development, which led me to BDD, at which point
I got really excited. I truly want to go forward with learning cucumber,
and rspec.

So here I am trying to started using cucumber, and I’m having a little
trouble. The documentation in the cucumber wiki isn’t, to my poverty
stricken perception, at all procedural, although individual pages seem
quite lucid and accessible. After reading and rereading (I’ve looked at
every page, and most several times), it appears that the “start” page is
“Cucumber Backgrounder”. The problem is that this assumes you are
working with Rails, about which I know little and desire to know less. I
get stuck, on that page, at the phrase…

==When you run “script/generate cucumber” ==

Huh? Is this something you do in Rails?

Then there’s this –


Running script/generate cucumber adds this layout to the existing
structure:

||-- features
| |-- step_definitions
| | -- webrat_steps.rb |– support
| `-- env.rb
|

We are now ready to begin testing with cucumber.


Well, maybe for some people…but not for me.

I simply cannot see what to do first. Do I manually create some kind of
directory structure and fill it with…well, with what? Feature
description files? And then what do I do? I’m guessing that this is
covered by the “Running features” page. Am I right?

Is there documentation somewhere that talks about using cucumber to
launch BDD using a non-Rails R. program? I think that’s what I really
need. I cannot quite get past this stuck place, so any help at all would
be much appreciated. I’m sorry to bother folks with this - I’m sure it’s
all quite obvious to you; I wish it were to me, and hope that it soon
will be.

Hopefully,

Tom

Tom C., MS MA, LMHC - Private practice Psychotherapist
Bellingham, Washington, U.S.A: (360) 920-1226
<< [email protected] >> (email)
<< TomCloyd.com >> (website)
<< sleightmind.wordpress.com >> (mental health weblog)

On Sun, Jan 11, 2009 at 1:26 PM, Tom C. [email protected] wrote:

So here I am trying to started using cucumber, and I’m having a little
Huh? Is this something you do in Rails?

Yes, this is Rails only.

I recommend you take a look at the examples/i18n folder. You’ll find
some
really simplistic Cucumber code that is simple Ruby. No Rails or other
complex material.

Aslak

Tom C. wrote:

The problem is that this assumes you are working with Rails, about
which I know little and desire to know less. I get stuck, on that page,
at the phrase…

==When you run “script/generate cucumber” ==

Huh? Is this something you do in Rails?

Then there’s this –


Running script/generate cucumber adds this layout to the existing
structure:

||-- features
| |-- step_definitions
| | -- webrat_steps.rb |– support
| `-- env.rb
|

We are now ready to begin testing with cucumber.


Well, maybe for some people…but not for me.

I simply cannot see what to do first.

First, let me a assure you that ignorance, or at least the admission to
it, is a de facto requirement here. If we all knew everything then
there would be precious little to write about.

Second, as the author of the Cucumber Backgrounder, I apologize for my
evident bias in creating a solely Rails Centric guide. This article
was, in fact, my first attempt at such a thing and I completely
overlooked that others might not approach testing with cucumber from
outside the Rails Framework. Over the next little while I will
endeavour to correct that defect.

Third, that article was intended as a guide on how to get cucumber
working inside a Rails project rather than a guide on how to actually
construct tests/features. In other words, it deals primarily with the
mechanics of setting up the environment rather than with exercising the
capabilities.

aslak hellesoy wrote:

I have a small project I'm working on - setting up a database
every page, and most several times), it appears that the "start"

Yes, this is Rails only.

I recommend you take a look at the examples/i18n folder. You’ll find
some really simplistic Cucumber code that is simple Ruby. No Rails or
other complex material.

Aslak
Thanks - yes that’s the complete picture I needed. I’m launched.
Fantastic!

t.

Tom C., MS MA, LMHC - Private practice Psychotherapist
Bellingham, Washington, U.S.A: (360) 920-1226
<< [email protected] >> (email)
<< TomCloyd.com >> (website)
<< sleightmind.wordpress.com >> (mental health weblog)

James B. wrote:

Then there’s this –
| `-- env.rb

First, let me a assure you that ignorance, or at least the admission to
it, is a de facto requirement here. If we all knew everything then
there would be precious little to write about.

Nicely put! Thanks for the reassurance. I remain assured, however, that
I’ll assuredly be the class dummy here, which is to say that I will
quite effortlessly make all others look very good (!).

Second, as the author of the Cucumber Backgrounder, I apologize for my
evident bias in creating a solely Rails Centric guide. This article
was, in fact, my first attempt at such a thing and I completely
overlooked that others might not approach testing with cucumber from
outside the Rails Framework. Over the next little while I will
endeavour to correct that defect.

Very kind of you.

Third, that article was intended as a guide on how to get cucumber
working inside a Rails project rather than a guide on how to actually
construct tests/features. In other words, it deals primarily with the
mechanics of setting up the environment rather than with exercising the
capabilities.

Distinction noted.

All me to say that I found, and continue to find, your article a primary
source of real value to me, far more useful to me than not, as I
commence my cucumber adventure, later today. Thanks for your effort, and
for any further efforts you make in a similar direction.

Tom

Tom C., MS MA, LMHC - Private practice Psychotherapist
Bellingham, Washington, U.S.A: (360) 920-1226
<< [email protected] >> (email)
<< TomCloyd.com >> (website)
<< sleightmind.wordpress.com >> (mental health weblog)