[rspec-users] cucumber/rails tutorial #2

Sarah Allen lists at ruby-forum.com
Mon Dec 29 20:30:54 EST 2008

Tim Walker wrote:
> Question: In your quest for BDD nirvana have you broached the subject
> of setup/teardown and reuse of Setup code?

Matt Wynne has a good blog post about re-using steps in cucumber: 

> What is a clean way of establishing a complex baseline state before
> operating on it with a suite of cucumber tests and without duplicating
> the "Given" in all of the subsequent "When" and "Thens"? Do you add a
> "helper.rb" to the steps folder or ? to keep this clean?

I also was reading that it is better to just set up your db data and 
establish a session, rather than doing all of the actions simulating the 

Here's a related post: http://www.ruby-forum.com/topic/174289#763689

There was another post or maybe it was a blog I was reading that gave 
specific example code for how to set up a session without going thru the 
login user steps, but I can't find the reference.... perhaps someone 
else knows.

I'm glad the tutorial was helpful.

Posted via http://www.ruby-forum.com/.

More information about the rspec-users mailing list