# Example on the Cucumber home page

**URL:** <https://www.ruby-forum.com/t/example-on-the-cucumber-home-page/157699>\
**Category:** RSpec\
**Created:** [January 14, 2009, 4:00pm UTC](https://www.ruby-forum.com/t/example-on-the-cucumber-home-page/157699 "2009-01-14T16:00:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nickh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/7ea924/32.png) [@nickh](https://www.ruby-forum.com/u/nickh)\
**Post date:** [January 14, 2009, 4:00pm UTC](https://www.ruby-forum.com/t/example-on-the-cucumber-home-page/157699/1 "2009-01-14T16:00:30Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![nickh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/7ea924/32.png) [@nickh](https://www.ruby-forum.com/u/nickh)\
**Post date:** [January 14, 2009, 4:04pm UTC](https://www.ruby-forum.com/t/example-on-the-cucumber-home-page/157699/2 "2009-01-14T16:04:03Z")

</div>

On Wed, Jan 14, 2009 at 3:57 PM, Nick H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
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
