From b305c829be36df5696ecb84fd263ef6f2b63cf9d Mon Sep 17 00:00:00 2001 From: Michael Miller Date: Mon, 22 Apr 2019 18:22:12 -0600 Subject: [PATCH] Allow hooks and conditions to be passed to create --- spec/helpers/failing_example.cr | 4 +--- spec/helpers/passing_example.cr | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/spec/helpers/failing_example.cr b/spec/helpers/failing_example.cr index a084cc7..706396b 100644 --- a/spec/helpers/failing_example.cr +++ b/spec/helpers/failing_example.cr @@ -26,9 +26,7 @@ class FailingExample < Spectator::RunnableExample end # Creates a failing example. - def self.create - hooks = Spectator::ExampleHooks.empty - conditions = Spectator::ExampleConditions.empty + def self.create(hooks = Spectator::ExampleHooks.empty, conditions = Spectator::ExampleConditions.empty) group = Spectator::RootExampleGroup.new(hooks, conditions) values = Spectator::Internals::SampleValues.empty new(group, values).tap do |example| diff --git a/spec/helpers/passing_example.cr b/spec/helpers/passing_example.cr index 9537c61..d1e6f44 100644 --- a/spec/helpers/passing_example.cr +++ b/spec/helpers/passing_example.cr @@ -32,9 +32,7 @@ class PassingExample < Spectator::RunnableExample end # Creates a passing example. - def self.create - hooks = Spectator::ExampleHooks.empty - conditions = Spectator::ExampleConditions.empty + def self.create(hooks = Spectator::ExampleHooks.empty, conditions = Spectator::ExampleConditions.empty) group = Spectator::RootExampleGroup.new(hooks, conditions) values = Spectator::Internals::SampleValues.empty new(group, values).tap do |example|