From 7484b92db9fd5ee327e25f6f8db55e2cb186287d Mon Sep 17 00:00:00 2001 From: Michael Miller Date: Thu, 27 Sep 2018 17:50:50 -0600 Subject: [PATCH] Formatting --- src/spectator/dsl/given_example_group_builder.cr | 1 - src/spectator/dsl/structure_dsl.cr | 1 - src/spectator/example_hooks.cr | 5 +++-- src/spectator/formatters/default_formatter.cr | 2 +- src/spectator/internals/sample_values.cr | 4 ++-- src/spectator/runnable_example.cr | 1 - src/spectator/runner.cr | 2 +- 7 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/spectator/dsl/given_example_group_builder.cr b/src/spectator/dsl/given_example_group_builder.cr index 2c79dcf..ba5b7d8 100644 --- a/src/spectator/dsl/given_example_group_builder.cr +++ b/src/spectator/dsl/given_example_group_builder.cr @@ -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 diff --git a/src/spectator/dsl/structure_dsl.cr b/src/spectator/dsl/structure_dsl.cr index 18be209..ebeb676 100644 --- a/src/spectator/dsl/structure_dsl.cr +++ b/src/spectator/dsl/structure_dsl.cr @@ -2,7 +2,6 @@ require "../example_group" module Spectator::DSL module StructureDSL - def initialize(sample_values : Internals::SampleValues) end diff --git a/src/spectator/example_hooks.cr b/src/spectator/example_hooks.cr index 2745c8e..488a754 100644 --- a/src/spectator/example_hooks.cr +++ b/src/spectator/example_hooks.cr @@ -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 diff --git a/src/spectator/formatters/default_formatter.cr b/src/spectator/formatters/default_formatter.cr index fee4167..cda7c03 100644 --- a/src/spectator/formatters/default_formatter.cr +++ b/src/spectator/formatters/default_formatter.cr @@ -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 diff --git a/src/spectator/internals/sample_values.cr b/src/spectator/internals/sample_values.cr index 5bb3997..8c0dec7 100644 --- a/src/spectator/internals/sample_values.cr +++ b/src/spectator/internals/sample_values.cr @@ -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) diff --git a/src/spectator/runnable_example.cr b/src/spectator/runnable_example.cr index dc03409..af49c82 100644 --- a/src/spectator/runnable_example.cr +++ b/src/spectator/runnable_example.cr @@ -2,7 +2,6 @@ require "./example" module Spectator abstract class RunnableExample < Example - def run result = ResultCapture.new group.run_before_all_hooks diff --git a/src/spectator/runner.cr b/src/spectator/runner.cr index 5ba03ab..e1aa52e 100644 --- a/src/spectator/runner.cr +++ b/src/spectator/runner.cr @@ -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