When running RSpec, I noticed the following 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. Instead consider providing a
specific error class or message. This message can be supressed by
setting:
RSpec::Expectations.configuration.warn_about_potential_false_positives = false. Called from
/path/to/chunky_png/spec/chunky_png/datastream_spec.rb:13:in `block
(3 levels) in <top (required)>'.
I noticed that it was raising a ChunkyPNG::CRCMismatch error, so I
decided it would be best to just include that detail in the matcher.
When running RSpec, I noticed the following warning:
I noticed that it was raising a
ChunkyPNG::CRCMismatch
error, so I decided it would be best to just include that detail in the matcher.