Ability to pass custom hooks to SpyExample
This commit is contained in:
parent
f20a0e2241
commit
e87f0b5e64
|
@ -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 New Issue