On Tue, Aug 11, 2009 at 8:51 AM, John Kolokotronis<johnj...@gmail.com> wrote: > Hi All, > > I've been using Rspec 1.1.8 for some time now and even though I am not > sure I'm doing this the best way possible, it allowed to get a full > description block of a nested example but Rspec 1.2.8 does not seem to > have the method I was using (__full_description).
By convention, anything prefixed with a "_" is not part of the public API and subject to change. > My example groups > would look like this: > > describe "My test suite" do > after(:each) > puts self.__full description > end > > describe "00001: My first test" do > it "should do something" do > # some code goes here > end > end > end > > With Rspec 1.1.8 (or lower), the __full_description method will give > me something like "My test suite 00001: My first test should do > something" which is exactly what I want. > > However, with Rspec 1.2.8, there is no such method. If I use > self.description, I only get what is in the it block, as expected. > > How can I access a full description string of a nested example like > __full_description used to do? Can I also access an example > description in the after(:each) block without referring to the self > object? Thanks in advance. There is no full_description method right now, but it's dead simple: def full_description "#{self.class.description} #{description}" end Feel free to file a ticket for this at http://rspec.lighthouseapp.com Cheers, David > Regards, > > John > > _______________________________________________ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users