[rspec-users] Old Style Stories

Zach Dennis zach.dennis at gmail.com
Fri Feb 22 08:46:43 EST 2008


On Thu, Feb 21, 2008 at 11:40 PM, David Chelimsky <dchelimsky at gmail.com> wrote:
> On Thu, Feb 21, 2008 at 10:26 PM, David Chelimsky <dchelimsky at gmail.com> wrote:
>  >
>  > On Thu, Feb 21, 2008 at 9:07 PM, Zach Dennis >  >  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.
>  >
>  >  You can do all of this already except using symbols instead of
>  >  Strings, something which doesn't strike me as more readable. Here's an
>  >  example:
>  >
>  >  http://pastie.caboo.se/155775
>
>  And here's another example with a bit more reuse expressed in the
>  steps at the expense of more complexity in the steps. Which approach
>  is better? I can't really say one is always better than the other. I
>  choose based on readability in a given context.

I hadn't even considered that using steps with the normal ruby stories
was an option. This gives what I am looking for.

As for symbols, they reduce a few keystrokes when you have to select
them and/or see find them in a file or in the project, or copy them.
They are not as readable as the strings as you point out. I may just
need to buck up and/or write a macro which gives me the ability to
select a string based on quotes. This is not really a story problem,
more of my editor lacking a feature I want.

> Just exploring  possibilities.

Ditto.

Thanks for the reply and for the code pastes.

-- 
Zach Dennis
http://www.continuousthinking.com


More information about the rspec-users mailing list