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
b9abdb86ff
commit
7484b92db9
7 changed files with 7 additions and 9 deletions
|
@ -2,7 +2,6 @@ require "./example_group_builder"
|
|||
|
||||
module Spectator::DSL
|
||||
class GivenExampleGroupBuilder(T) < ExampleGroupBuilder
|
||||
|
||||
def initialize(what : String, @collection : Array(T), @symbol : Symbol)
|
||||
super(what)
|
||||
end
|
||||
|
|
|
@ -2,7 +2,6 @@ require "../example_group"
|
|||
|
||||
module Spectator::DSL
|
||||
module StructureDSL
|
||||
|
||||
def initialize(sample_values : Internals::SampleValues)
|
||||
end
|
||||
|
||||
|
|
|
@ -15,7 +15,8 @@ module Spectator
|
|||
@before_each : Array(->),
|
||||
@after_all : Array(->),
|
||||
@after_each : Array(->),
|
||||
@around_each : Array(Proc(Nil) ->))
|
||||
@around_each : Array(Proc(Nil) ->)
|
||||
)
|
||||
end
|
||||
|
||||
def run_before_all
|
||||
|
@ -43,7 +44,7 @@ module Spectator
|
|||
end
|
||||
|
||||
private def wrap_proc(inner : Proc(Nil) ->, wrapper : ->)
|
||||
-> { inner.call(wrapper) }
|
||||
->{ inner.call(wrapper) }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -37,7 +37,7 @@ module Spectator::Formatters
|
|||
|
||||
private def display_failure(failure, number)
|
||||
expected = "TODO"
|
||||
actual = "TODO"
|
||||
actual = "TODO"
|
||||
puts " #{number}) #{failure.example}"
|
||||
puts " Failure: #{failure.error.message}"
|
||||
puts
|
||||
|
|
|
@ -14,8 +14,8 @@ module Spectator::Internals
|
|||
def add(id : Symbol, name : String, value : T) : SampleValues forall T
|
||||
wrapper = TypedValueWrapper(T).new(value)
|
||||
SampleValues.new(@values.merge({
|
||||
id => Entry.new(name, wrapper)
|
||||
}))
|
||||
id => Entry.new(name, wrapper),
|
||||
}))
|
||||
end
|
||||
|
||||
def get_wrapper(id : Symbol)
|
||||
|
|
|
@ -2,7 +2,6 @@ require "./example"
|
|||
|
||||
module Spectator
|
||||
abstract class RunnableExample < Example
|
||||
|
||||
def run
|
||||
result = ResultCapture.new
|
||||
group.run_before_all_hooks
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
module Spectator
|
||||
class Runner
|
||||
def initialize(@group : ExampleGroup,
|
||||
@formatter : Formatters::Formatter = Formatters::DefaultFormatter.new)
|
||||
@formatter : Formatters::Formatter = Formatters::DefaultFormatter.new)
|
||||
end
|
||||
|
||||
def run : Nil
|
||||
|
|
Loading…
Reference in a new issue