[rspec-users] Story Runner => Cucumber(duplicate steps)!
aslak.hellesoy at gmail.com
Tue Sep 23 12:32:57 EDT 2008
On Tue, Sep 23, 2008 at 6:18 PM, aidy lewis <aidy.lewis at googlemail.com> wrote:
> I am currently moving over my Watir Story Runner tests over to Cucumber.
> However, I have a verification_steps.rb that holds these two steps
> Then "the user is at '$title' page" do |title|
> Given "the user is at '$title' page" do |title|
> I think these *are* both valid 'Whens' and 'Thens', but I am getting a
> duplicate error from Cucumber.
> Any opinions or suggestions please?
Cucumber doesn't distinguish between Given/When/Then. Just delete one of them.
On a more semantic note - I usually recommend that:
* Given and When steps be expressed (grammatically) as non-negotiable facts
* Then steps be expressed (grammatically) as expectations ("should be
at the home page")
"Then" steps represent the outputs of your system, which is often
related to the feature's *business value*. What you get out of a
system and it's behaviour is not a fact, it's an expectation ;-)
> rspec-users mailing list
> rspec-users at rubyforge.org
More information about the rspec-users