[rspec-users] Best practices for sharing state between story steps?

2008-09-07 Thread Sam Stokes
Hi all, I'm just getting into RSpec stories and liking them (especially with webrat), but I'm finding it tricky to write steps that are self-contained and reusable, particularly where features intersect. What approaches do people use to achieve this? (Maybe a better question is, do people

Re: [rspec-users] Best practices for sharing state between story steps?

2008-09-08 Thread Sam Stokes
Jonathan Linowes wrote: I make some limited use of global (instance) variables that correspond to english language pronouns. I have things like @current_user (corresponds to I), @current_project (corresponds to the project), etc. I am careful to be consistent. There's only a handful of these,

Re: [rspec-users] Best practices for sharing state between story steps?

2008-09-08 Thread Sam Stokes
Zach Dennis wrote: This thread may help give you some insight... http://www.mail-archive.com/rspec-users@rubyforge.org/msg05382.html Thanks for pointing me there. The first insight it's given me is that I'm actually asking two different (though related) questions: 1) What's the best way to