Forum: RSpec Example on the Cucumber home page

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
49de4cd2f26705785cbef2b15a9df7aa?d=identicon&s=25 Nick Hoffman (nickh)
on 2009-01-14 16:00
(Received via mailing list)
Great work on the logo and website, Aslak & Co! It looks great, and
and the prominent six steps to using Cucumber is exactly what newbs.

I have one question about step #2. The Given-block initialises a new
Calculator each time it's run. This would cause the
   "Given I have entered 50 into the calculator"
and
   "And I have entered 70 into the calculator"
steps to have different Calculator objects, right?

If that's intentional, is it because step #6 tells you to repeat step
#s 2-5, which will cause you to refactor the Given-block in step #2,
resulting in a single, shared Calculator object?

Thanks for the clarification!
Nick
0be0e4aa42aacd9a8a95c792de273ca7?d=identicon&s=25 Aslak Hellesøy (aslakhellesoy)
on 2009-01-14 16:04
(Received via mailing list)
On Wed, Jan 14, 2009 at 3:57 PM, Nick Hoffman <nick@deadorange.com>
wrote:

> If that's intentional, is it because step #6 tells you to repeat step #s
> 2-5, which will cause you to refactor the Given-block in step #2, resulting
> in a single, shared Calculator object?
>

Spot on. Look at the examples for how it will end up.

Aslak
This topic is locked and can not be replied to.