[rspec-users] shared descriptions -- a couple of issues

Ashley Moran work at ashleymoran.me.uk
Wed Jun 27 10:10:09 EDT 2007


On 10 May 2007, at 18:02, Greg Spurrier wrote:

> a_spec.rb
> ---------
> describe "shared", :shared => true do
>    def foobar
>      37
>    end
>
>    it "foobar should be 37" do
>      foobar.should == 37
>    end
> end
>
> describe "not shared" do
>    it_should_behave_like "shared"
> end
>
>
> yields:
>
> % spec a_spec.rb
> F
>
> 1)
> NameError in 'not shared foobar should be 37'
> undefined local variable or method `foobar' for #<#<Class:0x106555c>:
> 0x1065188>

Hi

Just wondered if this issue is fixed in trunk?  I can't find an RFE  
and not sure how to interpret the replies to this post (they appear  
to be before 1.0.4 and we're on 1.0.5 now, but this behaviour is the  
same)

Ashley





More information about the rspec-users mailing list