Group children must be set

This commit is contained in:
Michael Miller 2018-10-20 22:56:24 -06:00
parent 16519db9bb
commit 4ab97bd215
1 changed files with 2 additions and 1 deletions

View File

@ -35,13 +35,14 @@ class SpyExample < Spectator::RunnableExample
end
end
# Creates the spy example.
# 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
group = Spectator::RootExampleGroup.new(hooks)
values = Spectator::Internals::SampleValues.empty
new(group, values).tap do |example|
group.children = [example.as(Spectator::ExampleComponent)]
example.block = block
end
end