On Tue, Sep 23, 2008 at 6:18 PM, aidy lewis <[EMAIL PROTECTED]> wrote:
> Hi,
>
> 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|
>   browser.wait_until_includes(title)
>   end
>
>    Given "the user is at '$title' page" do |title|
>   browser.wait_until_includes(title)
>   end
>
>
> 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")
http://www.englishpage.com/modals/should.html

"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 ;-)

Aslak

> Aidy
>
>
>
> _______________________________________________
> rspec-users mailing list
> rspec-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to