mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Formatting
This commit is contained in:
parent
868aa1d00a
commit
abe78410c4
2 changed files with 5 additions and 5 deletions
|
@ -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)
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue