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

Matt Wynne
Thu, 05 Feb 2009 07:48:25 -0000

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