[rspec-users] Evaluating shared example customisation block before shared block

Ashley Moran ashley.moran at patchspace.co.uk
Sun Aug 1 05:36:20 EDT 2010

On Jul 31, 2010, at 7:06 pm, Myron Marston wrote:

> I think this is a clunky way to essentially pass a parameter to the
> shared example group.  Better would be something like this:
> it_should_behave_like "something" do
>  providing :method_name, :foo
> end

After sleeping on this, I found an elegant solution (elegant in Ruby 1.9 anyway, I had to monkeypatch Ruby 1.8 to make it work) to the class method problem.  (It was exactly what I said before.)

So I *think* all the technical problems for this feature are solved, and the question is just how the it should actually behave...



More information about the rspec-users mailing list