[rspec-users] [Rspec] How do you nest before(:all) or after(:all) blocks?

Matt Wynne matt at mattwynne.net
Thu Feb 5 02:48:25 EST 2009


On 4 Feb 2009, at 17:55, John Kolokotronis wrote:

>> Why do you want before(:all)?  Generally it's use is disregarded,  
>> just
>> as global variables are considered harmful, not because they can't be
>> used well, but because 99% of the times they aren't.
>
> Because I want to be able to create a single @browser object at the
> beginning
> of my tests and have it passed to all examples. Without nested
> examples, that

Have you considered using Cucumber rather than RSpec as the driver to  
run these tests?

Matt Wynne
http://blog.mattwynne.net
http://www.songkick.com



More information about the rspec-users mailing list