Formatting

This commit is contained in:
Michael Miller 2021-07-31 14:18:59 -06:00
parent 868aa1d00a
commit abe78410c4
No known key found for this signature in database
GPG key ID: FB9F12F7C646A4AD
2 changed files with 5 additions and 5 deletions

View file

@ -168,8 +168,8 @@ module Spectator::DSL
#
# ```
# aggregate_failures do
# expect(true).to be_false
# expect(false).to be_true
# expect(true).to be_false
# expect(false).to be_true
# end
# ```
def aggregate_failures(label = nil)

View file

@ -27,9 +27,9 @@ module Spectator
return unless match_data = @match_data.as?(Matchers::FailedMatchData)
case message = @message
when String then message
when String then message
when Proc(String) then @message = message.call # Cache result of call.
else match_data.failure_message
else match_data.failure_message
end
end
@ -58,7 +58,7 @@ module Spectator
# The *location* is the location of the expectation in source code, if available.
# A custom *message* can be used in case of a failure.
def initialize(@match_data : Matchers::MatchData, @location : Location? = nil,
@message : String? | Proc(String) = nil)
@message : String? | Proc(String) = nil)
end
# Creates the JSON representation of the expectation.