diff --git a/spec/helpers/spy_example.cr b/spec/helpers/spy_example.cr index 626f3ce..0e5b87f 100644 --- a/spec/helpers/spy_example.cr +++ b/spec/helpers/spy_example.cr @@ -29,8 +29,7 @@ class SpyExample < Spectator::RunnableExample # Creates a spy example. # The block passed to this method will be executed when the example runs. - def self.create(&block) - hooks = Spectator::ExampleHooks.empty + def self.create(hooks = Spectator::ExampleHooks.empty, &block) group = Spectator::RootExampleGroup.new(hooks) values = Spectator::Internals::SampleValues.empty new(group, values).tap do |example|