cucumbers creating cucumbers

October 13th, 2008

I’m preparing to present a practical demonstration of rspec, cucumber and friends at Rails Summit Latin America this Thursday.

<p>I was playing with the idea of using cucumber/rspec to drive the development of a cucumber browser/editor, but I&#8217;ve decided that it ends up being a bit too meta for a conference presentation.</p>


<p>Of course, nothing is too meta for a blog post, and clearly I&#8217;ve already procrastinated a great deal if it&#8217;s just a few days before and I&#8217;m still prototyping the app, so why not take some more time away from what I should be doing and post this sillyness?</p>


<p>And with <strong>that</strong> ... enjoy!</p>

Feature: create feature

So that I can easily create new feature As a stakeholder I want to create a feature in a browser

Scenario: create feature When I create a new feature named "Eat Cheese" And I give "Eat Cheese" the narrative: So that I can be happy As a cheese-loving person I want to eat cheese And I add a scenario to "Eat Cheese" named "roquefort" And I add a step to "roquefort" with "Given I am holding my nose" And I add a step to "roquefort" with "When I eat a hunk o' roquefort" And I add a step to "roquefort" with "Then I should smile at its deliciousness"

And I save and run the "roquefort" scenario

Then I should see "3 steps pending"
And I should see:
  You can use these snippets to implement pending steps:

  Given /^I am holding my nose$/ do
  end

  When /^I eat a hunk o' roquefort$/ do
  end

  Then /^I should smile at its deliciousness$/ do
  end

DISCLAIMER: This also assumes some support for multi-line steps that has not yet been implemented and may not be supported as depicted here. So please don’t try this at home.

7 Responses to “cucumbers creating cucumbers”

  1. Aslak Hellesøy Says:

    Dude, that’s bent

  2. testeasy Says:

    wgy wuy wywu uye

  3. Rodrigo Yoshima Says:

    Hi David…

    <p>Can you post the slides of your presentation at Rails Summit?</p>
    
    
    <p>Thx&#8230;</p>
    
  4. MS Says:

    Is there an rspec on rails book on the horizon? If so, about when? Thanks!

  5. Camila Michelini Says:

    Hi David, I’m from Brasil and I went to Rails Summit Latin America, and I really enjoyed your presentation.

    <p>I&#8217;m novice in RoR and I was wondering if you could make available the slides from your presentation so I could study and remember some details that you explained.</p>
    
    
    <p>Thanks a lot</p>
    
  6. Joseph Wilk Says:

    I would say its more transparent

  7. Paulo Says:

    Nice work,

    <p>Off-topic: I&#8217;m looking for the second part of this blog post:
    

    http://blog.davidchelimsky.net/articles/2007/05/14/an-introduction-to-rspec-part-i

    <p>Does it exist?</p>
    
    
    <p>PS: your blog&#8217;s search doesn&#8217;t seem to be working, I searched for &#8220;rspec&#8221; and only 15 results showed up (not including the post I mentioned above)  Then I searched for &#8220;introduction&#8221; and only post I mentioned above showed up.</p>
    
    
    <p><span class="caps">PPS</span>: Your blog doesn&#8217;t have an &#8220;archives&#8221; section&#8230;</p>