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. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-users/attachments/20080321/b626245d/attachment.html
On Fri, Mar 21, 2008 at 5:24 AM, Tim Haines <tmhaines at gmail.com> 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 :) 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> > Cheers, > > Tim. > > > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
On Fri, Mar 21, 2008 at 9:38 AM, David Chelimsky <dchelimsky at gmail.com> wrote:> On Fri, Mar 21, 2008 at 5:24 AM, Tim Haines <tmhaines at gmail.com> 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 :) > > 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? >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 -- Zach Dennis http://www.continuousthinking.com
On Fri, Mar 21, 2008 at 10:02 AM, Zach Dennis <zach.dennis at gmail.com> wrote:> > On Fri, Mar 21, 2008 at 9:38 AM, David Chelimsky <dchelimsky at gmail.com> wrote: > > 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.Great idea Zach! Glad you thought of it ;) Cheers, David
On 3/21/08, David Chelimsky <dchelimsky at gmail.com> wrote:> On Fri, Mar 21, 2008 at 10:02 AM, Zach Dennis <zach.dennis at gmail.com> wrote: > > > > On Fri, Mar 21, 2008 at 9:38 AM, David Chelimsky <dchelimsky at gmail.com> wrote: > > > > 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. > > > Great idea Zach! Glad you thought of it ;)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 <rick.denatale at gmail.com> wrote:> > On 3/21/08, David Chelimsky <dchelimsky at gmail.com> wrote: > > On Fri, Mar 21, 2008 at 10:02 AM, Zach Dennis <zach.dennis at gmail.com> wrote: > > > > > > On Fri, Mar 21, 2008 at 9:38 AM, David Chelimsky <dchelimsky at gmail.com> wrote: > > > > > > 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. > > > > > > Great idea Zach! Glad you thought of it ;) > > 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.
On Fri, Mar 21, 2008 at 11:56 AM, Rick DeNatale <rick.denatale at gmail.com> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-users/attachments/20080321/822ba1f1/attachment.html
All, On Fri, Mar 21, 2008 at 11:02 AM, Zach Dennis <zach.dennis at gmail.com> wrote:> > 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? > > >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 Haines -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-users/attachments/20080321/79e73398/attachment.html
On Mar 21, 2008, at 3:18 pm, David Chelimsky 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 ;)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