We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
# bad expect { something }.not_to raise_error ArgumentError # good expect { something }.not_to raise_error
Motivation: Basically, I want the test to fail when an error occurs. The example is included in the Lint below, so we can make it a part of that Lint. https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecunspecifiedexception
but.. I think it would be okay to separate them and allow them to be applied individually.
The text was updated successfully, but these errors were encountered:
RSpec would warn for negation https://github.com/rspec/rspec-expectations/blob/2e8e800a0d8b64e7168dd625efe8f7526b7f1262/lib/rspec/matchers/built_in/raise_error.rb#L156 And it does a better job in runtime that we can with static analysis, eg for the mistakenly passed nil argument.
nil
It’s also good to turn on raise_on_warnings https://github.com/rspec/rspec-core/blob/1eeadce5aa7137ead054783c31ff35cbfe9d07cc/lib/rspec/core/configuration.rb#L1766
raise_on_warnings
We don’t try to duplicate what RSpec does already. Do you think there’s still anything actionable here, @marocchino ?
Sorry, something went wrong.
No branches or pull requests
Motivation:
Basically, I want the test to fail when an error occurs.
The example is included in the Lint below, so we can make it a part of that Lint.
https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecunspecifiedexception
but.. I think it would be okay to separate them and allow them to be applied individually.
The text was updated successfully, but these errors were encountered: