Formatting

This commit is contained in:
Michael Miller 2021-05-12 21:41:56 -06:00
parent 81f509c083
commit 1ea209184e
No known key found for this signature in database
GPG key ID: F9A0C5C65B162436
2 changed files with 4 additions and 4 deletions

View file

@ -53,7 +53,7 @@ module Spectator
protected def formatter
case (formatters = self.formatters)
when .one? then formatters.first
else Formatting::BroadcastFormatter.new(formatters)
else Formatting::BroadcastFormatter.new(formatters)
end
end
@ -165,8 +165,8 @@ module Spectator
protected def example_filter
case (filters = @filters)
when .empty? then NullExampleFilter.new
when .one? then filters.first
else CompositeExampleFilter.new(filters)
when .one? then filters.first
else CompositeExampleFilter.new(filters)
end
end
end

View file

@ -92,7 +92,7 @@ module Spectator
# Yields to run the test code and returns information about the outcome.
# Returns a tuple with the elapsed time and an error if one occurred (otherwise nil).
private def capture : Tuple(Time::Span, Exception?)
error = nil
error = nil
elapsed = Time.measure do
error = catch { yield }
end