mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Resolve warning about test using not_to raise_error
Resolves:
> 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 commit is contained in:
parent
23ee15f10d
commit
e449d78e23
1 changed files with 1 additions and 1 deletions
|
|
@ -50,6 +50,6 @@ describe TicketPdf do
|
|||
.to_return(status: 404, body: '', headers: {})
|
||||
|
||||
pdf = described_class.new(conference, participant, physical_ticket, layout, file_name)
|
||||
expect{ PDF::Inspector::Page.analyze(pdf.render) }.to_not raise_error(OpenURI::HTTPError)
|
||||
expect{ PDF::Inspector::Page.analyze(pdf.render) }.to_not raise_error
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue