Formatting

This commit is contained in:
Michael Miller 2018-09-27 17:50:50 -06:00
parent b9abdb86ff
commit 7484b92db9
7 changed files with 7 additions and 9 deletions

View file

@ -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

View file

@ -2,7 +2,6 @@ require "../example_group"
module Spectator::DSL
module StructureDSL
def initialize(sample_values : Internals::SampleValues)
end

View file

@ -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

View file

@ -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

View file

@ -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)

View file

@ -2,7 +2,6 @@ require "./example"
module Spectator
abstract class RunnableExample < Example
def run
result = ResultCapture.new
group.run_before_all_hooks

View file

@ -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