[rspec-users] More Examples

James B. Byrne byrnejb at harte-lyne.ca
Mon Nov 17 15:33:21 EST 2008

I have a feature spec that looks like this:

  Scenario: The entity common name should be normalized
   Given 1 valid entity
      And I am on the edit entity page
    When I fill in "Common Name" with "  ANYThing   WronG wITh tHiS? "
      And I press "Update"
    Then I should see an update success confirmation
      And I should see "Anything Wrong With This?"

  More Examples:
    | initial                       | after                    |
    | "ALL CAPS"                    | "All Caps"               |
    | "   Squeeze leading space"    | "Squeeze Leading Space"  |
    | "  Compact  Internal   space" | "Compact Internal Space" |

The first bit passes but for the life of me I cannot figure out what I am
supposed to do to get the More Examples to work.

I will grant from the outset that testing a string normalization feature
might be done somewhere/someway else but I am learning RSpec/Cucumber and
for now am taking that single minded approach to testing.  On the other
hand, I am not adverse to suggestions on how this might be best handled.

Guidance Please?

***          E-Mail is NOT a SECURE channel          ***
James B. Byrne                mailto:ByrneJB at Harte-Lyne.ca
Harte & Lyne Limited          http://www.harte-lyne.ca
9 Brockley Drive              vox: +1 905 561 1241
Hamilton, Ontario             fax: +1 905 561 0757
Canada  L8E 3C3

More information about the rspec-users mailing list