-
-
Notifications
You must be signed in to change notification settings - Fork 397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NoMethodError: undefined method `first' in NegativeExpectationHandler #115
Comments
There is some unfortunate legacy around |
Why is it only My test is a simple
However, when the test fails, the above error is spewed instead of a descriptive message. |
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. |
Thanks! :) On Mon, Mar 12, 2012 at 02:15:40PM -0700, David Chelimsky wrote:
Cezary Baginski |
(instead of skipping them). This behavior was originally added in in rspec-expectations commit 044b0a6, as part of rspec/rspec-expectations#115, which was intended to `expect("a").to eq("b")` from showing an extra diff, when the error message already showed the whole diff (so the diff itself was kind of unnecessary). There are tests already enforcing _that_, so we don't need to add any, but this change retains that behavior (though single-element single-line array comparisons do now get a diff).
In RSpec 2.8.0, I believe the line
rspec-expectations-2.8.0/lib/rspec/expectations/handler.rb:42
which contains:should be:
Simple check to test this (the test should fail, but not raise this error):
The text was updated successfully, but these errors were encountered: