04 Feb 2013, 17:56
6ec88fb092a2aad93c7af6d645fff57a_pragsmall

Yong Bakos (5 posts)

First, thanks for a great book. It’s a lot of fun to hack along with.

I’m working on the very last “Try This” and attempting to not write any of my own step defs, instead, delegating to Aruba. In other words, my upcasing_steps.rb is empty.

But for these requirements, I’m finding it a challenge to write all three Given/When/Then steps in the Scenario using Aruba’s step definitions. I seem to only be able to squeeze out a Given and a Then.

Feature: Upcasing
  Scenario: Upcasing a list of words
    Given I run `upcaser fee fi fo fum`
    Then the file "result.txt" should contain "FEE FI FO FUM"

Is this appropriate? I know that Given/When/Then is just a guide, but I feel like I should write something like:

    Given the input "fee fi fo fum"
    When I run `upcaser #{input_from_last_step}`
    Then the file "result.txt" should contain "FEE FI FO FUM"
  You must be logged in to comment