[rspec-users] Parameterised shared examples / metadata in examples (RSpec 2)

Ashley Moran ashley.moran at patchspace.co.uk
Fri Jul 23 05:38:49 EDT 2010

On Jul 23, 2010, at 8:57 am, Wincent Colaiuta wrote:

> Recently commited (RSpec 2.0.0.beta.18) was the ability to pass a block to "it_should_behave_like", making the relation clearer; eg:
>  describe MyStruct do
>    it_should_behave_like 'a Struct' do
>      let(:struct) { MyStruct.new }
>    end
>  end
> I did ask about parametrizing that explicitly via metadata, but David feels that the block based approach is better; see the full thread here:
>  http://github.com/rspec/rspec-core/issues/71

And I only just tweeted about that ticket too!  I didn't review it all though, I just saw the aliasing (which I currently do by hand).

That's in beta 18 then?  Pretty sure I just got that when I updated this morning.  Will play around with it later...



More information about the rspec-users mailing list