[rspec-users] Old Style Stories
zach.dennis at gmail.com
Thu Feb 21 22:07:10 EST 2008
On Wed, Feb 20, 2008 at 11:21 PM, Kero <rspec-users at kero.tmfweb.nl> wrote:
> > > I was working on a past project tonight to trunk which is using the
> > > old story format. IE:
> > > Given "desc" do / end
> > > When "someting "do /end
> > > etc..
> > >
> > > Is this officially supported, or is this just something that hasn't
> > > been ripped out yet?
> > It's funny to me that this is "Old Style" in your view. It's really
> > just another approach. Plain text is great for some situations, but so
> > is writing in Ruby :) Depends on the team, really, and how involved
> > the customer is in actually doing the typing.
> > > If it is officially supported how attached are people to the re-using
> > > of do/end blocks which match the same description. Every now and then
> > > it bites me and I end up having to change one of the descriptions to
> > > differ textually then another.
> > Why would this be specific to scenarios written in Ruby?
> > > IMO it is kind of annoying. A story
> > > part description may have the same description as another in the same
> > > scenario. Sometimes the sequence of steps provide the context,
> If I understand you correctly, then we had a discussion on this:
> and concluded that same-description means exactly-same-step, then continued
> which is still open.
Thanks for the links Kero. That ticket is the issue that I am talking about.
> > This seems unfinished - was there more to this sentence?
There may have been, but I cannot recall at this point.
> > I think this is just a matter of documentation. If we got rid of
> > block-sharing we'd be promoting much more verbose scenarios with a lot
> > of redundancy. I think it's here to stay.
An implementation of Kero's second ticket  would definitely help.
That extra feedback of "Hey, you already implemented this story part!
Right there on line 11" would be great.
A smaller annoyance associated with this is that story parts without
blocks can get lost visually when in a sea of story parts with do/end
blocks. I may be biased because on the last few customer driven
production projects I've been using test/unit story runner, which I
think is simpler and more developer friendly. 
As you mentioned David, "Plain text is great for some situations, but
so is writing in Ruby". This begs the question now that we have plain
text stories. Can we make the ruby-based stories more developer
friendly? Perhaps remove string identifiers, use symbols. Quit passing
in blocks to story parts, assume each story part is a method call, and
I'm sure there are other things that could be suggested as well.
0 - http://rspec.lighthouseapp.com/projects/5645/tickets/172-warn-or-fail-on-re-specified-when-then-clause
1 - http://www.continuousthinking.com/2007/11/14/test-unit-story-runner
More information about the rspec-users