Add tests for fail-fast and after hooks

Inspecting issue #2
This commit is contained in:
Michael Miller 2019-04-22 19:12:45 -06:00
parent b305c829be
commit 1d530de5b1
2 changed files with 42 additions and 0 deletions

View file

@ -33,4 +33,12 @@ class FailingExample < Spectator::RunnableExample
group.children = [example.as(Spectator::ExampleComponent)]
end
end
# Creates a group of failing examples.
def self.create_group(count = 5, hooks = Spectator::ExampleHooks.empty, conditions = Spectator::ExampleConditions.empty)
values = Spectator::Internals::SampleValues.empty
Spectator::RootExampleGroup.new(hooks, conditions).tap do |group|
group.children = Array.new(count) { new(group, values).as(Spectator::ExampleComponent) }
end
end
end