summaryrefslogtreecommitdiff
path: root/spec/unit/application
diff options
context:
space:
mode:
authorPete Higgins <pete@peterhiggins.org>2020-05-29 12:56:42 -0700
committerPete Higgins <pete@peterhiggins.org>2020-05-29 13:00:23 -0700
commit4eb0277dd70770590493163d63699af0ca809a31 (patch)
tree42c8bc3a51bb6c769f474d8ea9276e18f61b5520 /spec/unit/application
parent176a42569ea4601789b0aea2e897c3c2c1a78cc4 (diff)
downloadchef-fix-rspec-warning.tar.gz
Fix rspec warning about `not_to raise_error` with a specific exception.fix-rspec-warning
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/pete/work/chef/spec/unit/resource_spec.rb:381:in `block (4 levels) in <top (required)>'. Signed-off-by: Pete Higgins <pete@peterhiggins.org>
Diffstat (limited to 'spec/unit/application')
0 files changed, 0 insertions, 0 deletions