Pass exception failure message to error

This commit is contained in:
Michael Miller 2021-06-12 10:33:28 -06:00
parent 2407c43132
commit a5ed5d0fb1
No known key found for this signature in database
GPG key ID: FB9F12F7C646A4AD

View file

@ -81,7 +81,7 @@ module Spectator
# TODO: Move this out of harness, maybe to `Example`.
Example.current.name = expectation.description unless Example.current.name?
raise ExpectationFailed.new(expectation) if expectation.failed?
raise ExpectationFailed.new(expectation, expectation.failure_message) if expectation.failed?
end
# Stores a block of code to be executed later.