Group children must be set

This commit is contained in:
Michael Miller 2018-10-20 22:56:24 -06:00
parent 16519db9bb
commit 4ab97bd215

View file

@ -35,13 +35,14 @@ class SpyExample < Spectator::RunnableExample
end end
end end
# Creates the 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(&block)
hooks = Spectator::ExampleHooks.empty 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|
group.children = [example.as(Spectator::ExampleComponent)]
example.block = block example.block = block
end end
end end