Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

RSpec: expect exact exception to avoid RSpec warnings #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

olleolleolle
Copy link

This PR makes the test suite run without outputting the warning:

.WARNING: Using the `raise_error` matcher without providing a specific error or 
message risks false positives, since `raise_error` will match when Ruby raises a 
`NoMethodError`, `NameError` or `ArgumentError`, potentially allowing the 
expectation to pass without even executing the method you are intending to call. 
Actual error raised was #<RuntimeError: please install postgresql>. Instead consider 
providing a specific error class or message. This message can be suppressed by setting: 
`RSpec::Expectations.configuration.on_potential_false_positives = :nothing`. Called from 
/opt/src/opensource/ruby/pgtester/spec/pg_tester_spec.rb:36:in `block (4 levels) in <top 
(required)>'.

  - to avoid RSpec warnings
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants