On Wed, May 13, 2009 at 3:36 PM, mortench <morte...@gmail.com> wrote: > On 13 Maj, 07:28, David Chelimsky <dchelim...@gmail.com> wrote: >> You can access the group and example options from within an example: >> >> describe "group options hash", :defined_in => :group do >> it "is available in examples via self.class.options" do >> self.class.options[:defined_in].should == :group >> end >> end > > Yes, I got this to work too but not for nested describes as below: > > describe "group options hash", :defined_in => :group do > .. > describe "nested describe wont work" > it "is available in examples via self.class.options" do > self.class.options[:defined_in].should == :group # WONT work > end > end > > end > > BTW. I am actually accessing the hash from within a common helper > files in a before action setup by Spec::Runner.configure. Hence it is > important that accessing the Hash work regardless of how the describes > are nested.
Just catching up on some old mail here - would you please add a feature request for this? http://rspec.lighthouseapp.com _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users