Rspec plain text stories

Posted by Andre Foeken Tue, 06 Nov 2007 14:54:06 GMT

Simply said. They are great. We've been using them since they came out and have been following the trunk ever since.

They are so easy and elegant, they just needed a little TextMate love. So here you go: A language grammer and an adapted Vibrant Ink theme. (Download here)

P.S If anyone can tell me how to include stories in autotest runs I would be very happy!

Comments

  1. David Chelimsky said about 3 hours later:
    This is cool! What are you doing with Pending? Did you patch that to be meaningful? Personally, I wouldn't want stories to run with autotest in my own practice - they're not really intended to be part of the very tight feedback loop of the TDD cycle.
  2. Aslak Hellesøy said about 7 hours later:
    Really cool! Would you be willing to donate this to the official RSpec.tmbundle under the RSpec license? You'd get due kudos. Drop me a mail if you are.
  3. Andre Foeken said about 7 hours later:
    Yeah sure, no problem! Though the language grammar could get some extra attention (it was my first one), I'd be happy to hand it to you guys.

    I added Pending as a keyword in the syntax. We are using the stories and it helps to think of scenario titles before 'implementing' them. Unfortunately I haven't gotten around to actually looking at the Rspec code, so it's not patched. But I might be looking into that, should not be rocket science right?, given they should act the same as the other keywords.

    With regard to autotest I find that we have two kinds of stories. One that simply integrates the MVC model (which I would like in autotest) and others that are more descriptive and make us feel better (just knowing that that string of actions is working as it is supposed to).
  4. George Anderson said 119 days later:
    If you change:
    match = '(As an|I want to|So that)(.*)';
    
    to:
    match = '(As an?|I want to|So that)(.*)';
    
    it will match
    As an administrator
    
    and
    As a manager
    
    Thanks for sharing your work.

(leave url/email »)

   Preview comment