Pending Scenarios

Hi there,

newb q: The “pending” support for spec’s and steps is nice. I’m just
wondering why a scenario itself can’t be pending? I.e. it seems to me
like
it would be nice to write up scenario titles for scenarios as you think
of
them, and for low-priority fringe scenarios leave the steps unwritten
until
it comes time to implement the scenario?

Is there a way to add comments to the plain text file in plain text
stories?

Cheers,

Tim.

On Fri, Mar 21, 2008 at 5:24 AM, Tim H. [email protected] wrote:

Hi there,

newb q: The “pending” support for spec’s and steps is nice. I’m just
wondering why a scenario itself can’t be pending?

Because nobody asked for it :slight_smile:

Wanna file a feature request at lighthouse?
http://rspec.lighthouseapp.com

I.e. it seems to me like
it would be nice to write up scenario titles for scenarios as you think of
them, and for low-priority fringe scenarios leave the steps unwritten until
it comes time to implement the scenario?

Is there a way to add comments to the plain text file in plain text stories?

Anything between the line that begins with Story: and the first line
that begins with Scenario: will be part of the story narrative. Sort
of like a comment, but it gets printed out. So I sometimes add
additional commentary there to provide context around the “As a …, I
want …, So that …” statement.

Anything after the first Scenario: that does not begin with any of the
keywords (Scenario:, Given, When, Then, And) is simply ignored, so you
can put comments between steps and they will not be processed.

I would not go crazy with this at this point because there has been a
request to support multiline text in plain text stories, at which
point your comments might accidentally get interpreted.

Perhaps now is the time to devise a formal “comment indicator.” I
think the obvious choice would be the same one we use in Ruby: #

Given this step

this is a comment

When this other step
etc

Thoughts?

Cheers,
David

On Fri, Mar 21, 2008 at 9:38 AM, David C. [email protected]
wrote:

additional commentary there to provide context around the "As a …, I
Perhaps now is the time to devise a formal “comment indicator.” I
think the obvious choice would be the same one we use in Ruby: #

Given this step

this is a comment

When this other step
etc

Thoughts?

Rather than anything that does not start with
Scenario|Given|When|Then|And being treated as a comment it seems more
future-proof if we just say that any line whose first non-whitespace
character is a # … is a comment.

Although I’m not crazy about inserting comments into plain text story
files, I think that there are times when it would indeed be useful and
I’d want to give the developer or customer the ability to make the
call when they might need it.

Zach

On Fri, Mar 21, 2008 at 10:02 AM, Zach D. [email protected]
wrote:

Thoughts?

Rather than anything that does not start with
Scenario|Given|When|Then|And being treated as a comment it seems more
future-proof if we just say that any line whose first non-whitespace
character is a # … is a comment.

Great idea Zach! Glad you thought of it :wink:

Cheers,
David

On 3/21/08, David C. [email protected] wrote:

etc
Great idea Zach! Glad you thought of it :wink:
Doesn’t it already work this way?

If I “comment out” lines this way in a plain text story, they seem to
be totally ignored.


Rick DeNatale

My blog on Ruby
http://talklikeaduck.denhaven2.com/

On Fri, Mar 21, 2008 at 10:56 AM, Rick DeNatale
[email protected] wrote:

this is a comment

Great idea Zach! Glad you thought of it :wink:

Doesn’t it already work this way?

If I “comment out” lines this way in a plain text story, they seem to
be totally ignored.

Yes but that’s not because it is explicitly ignored based on that
character. What we’re discussing here is making it explicit.

All,

On Fri, Mar 21, 2008 at 11:02 AM, Zach D. [email protected]
wrote:

Just a counter-thought off the top of my head. I like the idea that the
plain text stories are just that: plain text. If we start adding comment
tokens, then it just feels a bit like it is pulling away from plain
text.

It seems like this really would only contribute to the
ease-of-implementation for multi-line steps. Could you instead have a
token
for multi-line, some sort of (shudder) line continuation character?

-Corey H.

On Fri, Mar 21, 2008 at 11:56 AM, Rick DeNatale
[email protected]
wrote:

Doesn’t it already work this way?

If I “comment out” lines this way in a plain text story, they seem to
be totally ignored.

I believe that is because the current behavior is that anything that
doesn’t
start with a keyword is considered a comment.

-Corey

On Mar 21, 2008, at 3:18 pm, David C. wrote:

Rather than anything that does not start with
Scenario|Given|When|Then|And being treated as a comment it seems more
future-proof if we just say that any line whose first non-whitespace
character is a # … is a comment.

Great idea Zach! Glad you thought of it :wink:

I was about to say I’ve got mixed feelings about this because I always
considered the plain text story files to be a publishable document.
But now I’ve noticed there’s a class Story::HtmlFormatter hidden away
in the gem that could be used to prepare that, which means the .story
files are really just another source file (so I vote +1 for the /^
\s*#/ comment rule).

Raises the question, though - how do you use the story formatters?
Can you do it through the spec command somehow? I’ve never seen
anything about them.

Ashley