Warn about bare raise_error#768
Conversation
There was a problem hiding this comment.
We have all our configuration exposed off of RSpec::Expectations.configuration, so it seems odd to have this other config here.
There was a problem hiding this comment.
I was on the fence about where this should live, given it's very specific it seemed slightly odd to have a config option for it, but I'm happy to move the config there.
|
So I'm realizing that this is going a different direction then we did for the issue of I'm also realizing that we may have other places in the future where we realize that a particular use of matcher is prone to false positives and should be discouraged. Given that, I'm thinking maybe we do the following:
Thoughts? |
|
Yup, agree |
37bf1a2 to
d500923
Compare
|
This is changed as discussed, I'll tackle changing |
4d61db2 to
f4a9dc6
Compare
|
Woop fixed Rubocop |
There was a problem hiding this comment.
I think these 10 lines could benefit from being extracted into a helper method. It's a lot to have in-lined into matches?.
a9f339e to
a7133e9
Compare
|
This should be good to go now? |
There was a problem hiding this comment.
The suppression of the warning via the config is the point of this example, so it seems like it should be front and center in the example rather then hidden in a shared context. I was expecting the shared context to be used to guarantee the config value is reset back to what it started at, but not to actually make the state change itself.
|
Left a couple comments but they aren't super important. Feel free to merge w/o addressing them. |
a7133e9 to
9977848
Compare
|
LGTM, merge when green. |
3404bdf to
4ac75c9
Compare
- fixes RSpec 3.3 warning: rspec/rspec-expectations#768
Issues a warning (which can be supressed) when using a bare
raise_errorcall. Fixes #655.