mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Ability to pass custom hooks to SpyExample
This commit is contained in:
parent
f20a0e2241
commit
e87f0b5e64
1 changed files with 1 additions and 2 deletions
|
@ -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|
|
||||
|
|
Loading…
Reference in a new issue