[rspec-users] Multi-line steps
Rick DeNatale
rick.denatale at gmail.com
Wed Apr 9 10:29:12 EDT 2008
On Wed, Apr 9, 2008 at 9:14 AM, aslak hellesoy <aslak.hellesoy at gmail.com> wrote:
> On Wed, Apr 9, 2008 at 2:59 PM, Rick DeNatale <rick.denatale at gmail.com> wrote:
> > On Wed, Apr 9, 2008 at 6:03 AM, Ashley Moran
> >
> > <ashley.moran at patchspace.co.uk> wrote:
> >
> > > Hi
> > >
> > > I just wondered what the plan was for multi-line steps. Is anyone
> > > working on it? I've just come across a real use for it (including
> > > small text files in the story).
> >
> > It' might be a little clunky, but I've recently done something like
> > this in a story involving uploading a csv file
> >
> > ....
> > When Fred creates a csv file
> > And the csv file has a record with "first_name", "last_name"
> > And the csv file has a record with "Bilbo", "Baggins"
> > And the csv file has a record with "Arwen", "Evenstar"
> > And Fred uploads the csv file
> >
>
> Just a style comment: I usually strive for a single When (in this case
>
> Fred uploads the csv file).
> The other ones are Givens.
Yes, that's how I actually wrote it, just checked. I was working from
memory from a machine which didn't have the actual code, and with too
little coffee in my system for that hour of the morning to boot! <G>
--
Rick DeNatale
My blog on Ruby
http://talklikeaduck.denhaven2.com/
More information about the rspec-users
mailing list