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

Dhananjay V. lists at ruby-forum.com
Thu Oct 24 18:39:03 UTC 2013

David Chelimsky wrote in post #777566:
> On Wed, Feb 4, 2009 at 3:07 AM, John Kolokotronis <johnjkle at gmail.com>
> wrote:
>> describe "This is a set of tests: " do
>>        end
>> - this should only appear once
>> - test 1
>> - this should only appear once
>> - test 2
>> So my question is, how can you add before/after(:all) blocks that run
>> once and only once for for all examples, if all the examples are
>> nested in one main describe block? Is that something that's even
>> possible? I'd appreciate any pointers anyone may have. Thanks!
> Right now it's not possible. There's an open ticket on this:
> http://rspec.lighthouseapp.com/projects/5645/tickets/632

I could not see the status of the ticket as it was restricted..Any 
updates with regards to the use of the global variable objects in the 
same script call before test.. Any best practices mentioned or 

Posted via http://www.ruby-forum.com/.

More information about the rspec-users mailing list