[rspec-users] [cucumber] accessing session variables
lists at ruby-forum.com
Sat Mar 14 20:11:14 EDT 2009
Oh, I see. I'll heed your advice and will consider using @user for the
logged in user in the future.
Matt Wynne wrote:
> On 14 Mar 2009, at 19:11, Balint Erdi wrote:
>> 3. using instance variables to pass state in the course of a features
>> makes step definitions too coupled. (I have not experienced this but
>> read it in the thread and it seems logical)
> I think you have to be pragmatic about this. We have a @user variable
> in our steps that represents 'me' and that has worked OK for us. I
> think that's just about the only time we've had to use instance
> variables in 900 or so scenarios, but there are certainly times when
> it makes sense. You just have to be aware of the risks and not use
> them too cheaply.
Posted via http://www.ruby-forum.com/.
More information about the rspec-users