You can clone with
HTTPS or Subversion.
In RSpec 2.8.0, I believe the line rspec-expectations-2.8.0/lib/rspec/expectations/handler.rb:42 which contains:
::RSpec::Expectations.fail_with message, matcher.expected.first, matcher.actual
::RSpec::Expectations.fail_with message, matcher.expected, matcher.actual
Simple check to test this (the test should fail, but not raise this error):
NoMethodError: undefined method `first' for 1:Fixnum
from /usr/local/lib/ruby/gems/1.9.1/gems/rspec-expectations-2.8.0/lib/rspec/expectations/handler.rb:42:in `handle_matcher'
from /usr/local/lib/ruby/gems/1.9.1/gems/rspec-expectations-2.8.0/lib/rspec/expectations/extensions/kernel.rb:24:in `should_not'
from /usr/local/bin/irb:12:in `<main>'
There is some unfortunate legacy around matcher.expected.first so it can't just be changed without breaking a bunch of stuff out in the wild. What problem are you experiencing as a result?
Why is it only matcher.expected.first in NegativeExpectationHandler, but matcher.expected in PositiveExpectationHandler?
My test is a simple
However, when the test fails, the above error is spewed instead of a descriptive message.
Treat expected args consistently across positive and negative expecta…
- Fixes #115.
Changlog for #115
Could you bump Rspec to 1.8.1 to release this? Thanks.
Released 2.9.0.rc2 this morning. 2.9 to follow by the weekend barring any unforeseen issues.