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
|
module Spectator::DSL
|
||||||
class GivenExampleGroupBuilder(T) < ExampleGroupBuilder
|
class GivenExampleGroupBuilder(T) < ExampleGroupBuilder
|
||||||
|
|
||||||
def initialize(what : String, @collection : Array(T), @symbol : Symbol)
|
def initialize(what : String, @collection : Array(T), @symbol : Symbol)
|
||||||
super(what)
|
super(what)
|
||||||
end
|
end
|
||||||
|
|
|
@ -2,7 +2,6 @@ require "../example_group"
|
||||||
|
|
||||||
module Spectator::DSL
|
module Spectator::DSL
|
||||||
module StructureDSL
|
module StructureDSL
|
||||||
|
|
||||||
def initialize(sample_values : Internals::SampleValues)
|
def initialize(sample_values : Internals::SampleValues)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,8 @@ module Spectator
|
||||||
@before_each : Array(->),
|
@before_each : Array(->),
|
||||||
@after_all : Array(->),
|
@after_all : Array(->),
|
||||||
@after_each : Array(->),
|
@after_each : Array(->),
|
||||||
@around_each : Array(Proc(Nil) ->))
|
@around_each : Array(Proc(Nil) ->)
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
def run_before_all
|
def run_before_all
|
||||||
|
@ -43,7 +44,7 @@ module Spectator
|
||||||
end
|
end
|
||||||
|
|
||||||
private def wrap_proc(inner : Proc(Nil) ->, wrapper : ->)
|
private def wrap_proc(inner : Proc(Nil) ->, wrapper : ->)
|
||||||
-> { inner.call(wrapper) }
|
->{ inner.call(wrapper) }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -14,7 +14,7 @@ module Spectator::Internals
|
||||||
def add(id : Symbol, name : String, value : T) : SampleValues forall T
|
def add(id : Symbol, name : String, value : T) : SampleValues forall T
|
||||||
wrapper = TypedValueWrapper(T).new(value)
|
wrapper = TypedValueWrapper(T).new(value)
|
||||||
SampleValues.new(@values.merge({
|
SampleValues.new(@values.merge({
|
||||||
id => Entry.new(name, wrapper)
|
id => Entry.new(name, wrapper),
|
||||||
}))
|
}))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,6 @@ require "./example"
|
||||||
|
|
||||||
module Spectator
|
module Spectator
|
||||||
abstract class RunnableExample < Example
|
abstract class RunnableExample < Example
|
||||||
|
|
||||||
def run
|
def run
|
||||||
result = ResultCapture.new
|
result = ResultCapture.new
|
||||||
group.run_before_all_hooks
|
group.run_before_all_hooks
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue