You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running the test suite ($ rspec), there is a warning that the test for "when the unhandled keys are ignored, it does not raise an error" could result in false positives.
WARNING: Using `expect { }.not_to raise_error(SpecificErrorClass)` risks false positives, since literally any other error would cause the expectation to pass, including those raised by Ruby (e.g. `NoMethodError`, `NameError` and `ArgumentError`), meaning the code you are intending to test may not even get reached. Instead consider using `expect { }.not_to raise_error` or `expect { }.to raise_error(DifferentSpecificErrorClass)`. This message can be suppressed by setting: `RSpec::Expectations.configuration.on_potential_false_positives = :nothing`. Called from /Users/nicoledow/Development/opex/decanter/spec/decanter/decanter_core_spec.rb:343:in `block (6 levels) in <top (required)>'.
Environment
decanter version: 4.0.2
ruby version: 2.7.7
rails version: N/A
Expected Behavior
The test suite passes with no warnings.
There is no risk of "false positives" when testing the desired behavior
Current Behavior
There is a warning when running the test suite.
Steps to Reproduce
Run $ rspec and view the warning in the console.
Suggested Solution
Not sure. I think we should refactor the test to remove the warning, and also confirm the tested code is in fact creating the desired behavior (i.e. we don't have a false positive).
The text was updated successfully, but these errors were encountered:
When running the test suite (
$ rspec
), there is a warning that the test for "when the unhandled keys are ignored, it does not raise an error" could result in false positives.Environment
decanter
version: 4.0.2ruby
version: 2.7.7rails
version: N/AExpected Behavior
Current Behavior
There is a warning when running the test suite.
Steps to Reproduce
Run
$ rspec
and view the warning in the console.Suggested Solution
Not sure. I think we should refactor the test to remove the warning, and also confirm the tested code is in fact creating the desired behavior (i.e. we don't have a false positive).
The text was updated successfully, but these errors were encountered: