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.
|
# Creates a spy example.
|
||||||
# The block passed to this method will be executed when the example runs.
|
# The block passed to this method will be executed when the example runs.
|
||||||
def self.create(&block)
|
def self.create(hooks = Spectator::ExampleHooks.empty, &block)
|
||||||
hooks = Spectator::ExampleHooks.empty
|
|
||||||
group = Spectator::RootExampleGroup.new(hooks)
|
group = Spectator::RootExampleGroup.new(hooks)
|
||||||
values = Spectator::Internals::SampleValues.empty
|
values = Spectator::Internals::SampleValues.empty
|
||||||
new(group, values).tap do |example|
|
new(group, values).tap do |example|
|
||||||
|
|
Loading…
Reference in a new issue