mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Allow hooks and conditions to be passed to create
This commit is contained in:
parent
29df8716de
commit
b305c829be
2 changed files with 2 additions and 6 deletions
|
@ -26,9 +26,7 @@ class FailingExample < Spectator::RunnableExample
|
||||||
end
|
end
|
||||||
|
|
||||||
# Creates a failing example.
|
# Creates a failing example.
|
||||||
def self.create
|
def self.create(hooks = Spectator::ExampleHooks.empty, conditions = Spectator::ExampleConditions.empty)
|
||||||
hooks = Spectator::ExampleHooks.empty
|
|
||||||
conditions = Spectator::ExampleConditions.empty
|
|
||||||
group = Spectator::RootExampleGroup.new(hooks, conditions)
|
group = Spectator::RootExampleGroup.new(hooks, conditions)
|
||||||
values = Spectator::Internals::SampleValues.empty
|
values = Spectator::Internals::SampleValues.empty
|
||||||
new(group, values).tap do |example|
|
new(group, values).tap do |example|
|
||||||
|
|
|
@ -32,9 +32,7 @@ class PassingExample < Spectator::RunnableExample
|
||||||
end
|
end
|
||||||
|
|
||||||
# Creates a passing example.
|
# Creates a passing example.
|
||||||
def self.create
|
def self.create(hooks = Spectator::ExampleHooks.empty, conditions = Spectator::ExampleConditions.empty)
|
||||||
hooks = Spectator::ExampleHooks.empty
|
|
||||||
conditions = Spectator::ExampleConditions.empty
|
|
||||||
group = Spectator::RootExampleGroup.new(hooks, conditions)
|
group = Spectator::RootExampleGroup.new(hooks, conditions)
|
||||||
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