Re: [rspec-users] using @variables in an 'it' block

2007-09-27 Thread Ben Mabey
Have you tried just turning @selenium into a method for lazy initialization? So, you could have: def selenium @selenium ||= SeleniumHelper.selenium end The in your spec just use the method call as opposed to the instance variable. That is probably what I would do. I have never used in

[rspec-users] using @variables in an 'it' block

2007-09-27 Thread Korny Sietsma
Hi folks, I'm somewhat new to the current RSpec release - at work we are still using 0.8.something, with "context 'blah' do ... specify 'should thing' ..." We have some helper code to automatically mix-in selenium: module SeleniumHelper include SpecHelper ... def initialize(arg) @selenium