Recommendations for ticket #971 workaround?


I’m running rspec 1.3.0 on Ruby 1.9.2-dev. It appears that when you
use it without a corresponding block, the test case is treated not
as pending, but instead throws an error inside rspec. I see that there
is a bug to this effect filed here:

Lines 79 through 81 of lib/spec/example/example_group_methods.rb look
like this:

  def pending_implementation
    lambda { raise(Spec::Example::NotYetImplementedError) }

An argument is passed to the lambda in example_methods.rb. In Ruby
1.9.2, lambdas are stricter about the arguments they accept. In this
case, to get the same behavior I think we probably want either proc { ... } or lambda { |a*| ... }.

Given that the official patch isn’t in yet, do you recommend that
people upgrade to rspec 2.0 (which appears not to have this problem),
fall back to 1.9.1, or stay where they are and manually patch? Right
now I’ve patched my example_group_methods.rb to be proc instead of
lambda, but I always feel a little iffy when directly modifying my

  • John