On 2 Aug 2010, at 2:04 AM, Myron Marston wrote: > I actually find the use of this to be a bit confusing: > > [:foo, :bar].each do |arg| > it_should_behave_like "Something", arg do |a| > # The value of the param is already bound to arg and now it's > bound to a, too. > end > end > > I suppose it may be useful in some situations, so I'm fine with it as > long as the implementation allows you to skip the `|a|`: > > [:foo, :bar].each do |arg| > it_should_behave_like "Something", arg do > # no need to declare the |a| parameter since we already have it in > arg. > # I find this to be less confusing. > end > end
Agreed - requiring the block parameter to be declared in the host group is putting the onus back on the user, not the author, of the shared examples. I think we need a way to implement the second version. Ash -- http://www.patchspace.co.uk/ http://www.linkedin.com/in/ashleymoran _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users