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: http://blog.mattwynne.net/2008/11/14/dry-up-your-cucumber-steps/ > 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 user. 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. Sarah -- Posted via http://www.ruby-forum.com/. _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users