#474 √ resolved
Ben Mabey

Comments below plaintext stories cause 'Unimplemented step' errors

Reported by Ben Mabey | July 19th, 2008 @ 08:02 AM | in 1.1.5

I just got bit by a nasty plaintext bug, that I think was introduced with the multiline step changes. (So, this is on edge rspec.)

If you set up a story like this:

Story: title

  As a role
  I want feature
  So that value
  
  
  Scenario: this is an example
    Given some state    
    When some action
    Then something should happen
    
    # Scenario: another example, but it has been commented out purposely
    #   Given some state    
    #   When some action
    #   Then something should happen

And then you implement all of the steps and run the story you get:

Pending Steps:
1) title (this is an example): something should happen

The reason is due to the fact that the name for the "something should happen" step is read is as "something should happen\n\n". The extra new lines at the end prevent StepMother from matching the correct step/implementation and thus raises the 'Unimplemented step' error.

My fix for the problem is at:

http://github.com/bmabey/rspec/c...

Please see the comment I made on github about one of my changes.

Just tell me if you would like to go about the fix a different way.

Thanks,

Ben

Comments and changes to this ticket

  • Ben Mabey

    Ben Mabey July 19th, 2008 @ 08:03 AM

    yuck, sorry about that formatting in the stories...

  • Ben Mabey

    Ben Mabey July 19th, 2008 @ 08:05 AM

    Ahh, the formatting actually took out the most important part of the story (the comments below.) Let me try that again....

    Story: title
    
      As a role
      I want feature
      So that value
      
      
      Scenario: this is an example
        Given some state    
        When some action
        Then something should happen
        
        # Scenario: another example, but it has been commented out purposely
        #   Given some state    
        #   When some action
        #   Then something should happen
        #   #And something else should happen
    
  • David Chelimsky

    David Chelimsky August 5th, 2008 @ 10:47 AM

    • → State changed from “new” to “resolved”
    • → Milestone changed from “No-Milestone-Assigned” to “1.1.5”

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Behaviour Driven Development for Ruby.

Shared Ticket Bins

People watching this ticket