mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Update existing specs to support conditions
This commit is contained in:
parent
38202ff605
commit
d9363fc8a7
8 changed files with 171 additions and 169 deletions
|
@ -18,7 +18,8 @@ class FailingExample < Spectator::RunnableExample
|
|||
# Creates a failing example.
|
||||
def self.create
|
||||
hooks = Spectator::ExampleHooks.empty
|
||||
group = Spectator::RootExampleGroup.new(hooks)
|
||||
conditions = Spectator::ExampleConditions.empty
|
||||
group = Spectator::RootExampleGroup.new(hooks, conditions)
|
||||
values = Spectator::Internals::SampleValues.empty
|
||||
new(group, values).tap do |example|
|
||||
group.children = [example.as(Spectator::ExampleComponent)]
|
||||
|
|
|
@ -19,7 +19,8 @@ class PassingExample < Spectator::RunnableExample
|
|||
# Creates a passing example.
|
||||
def self.create
|
||||
hooks = Spectator::ExampleHooks.empty
|
||||
group = Spectator::RootExampleGroup.new(hooks)
|
||||
conditions = Spectator::ExampleConditions.empty
|
||||
group = Spectator::RootExampleGroup.new(hooks, conditions)
|
||||
values = Spectator::Internals::SampleValues.empty
|
||||
new(group, values).tap do |example|
|
||||
group.children = [example.as(Spectator::ExampleComponent)]
|
||||
|
|
|
@ -34,8 +34,8 @@ class SpyExample < Spectator::RunnableExample
|
|||
|
||||
# Creates a spy example.
|
||||
# The block passed to this method will be executed when the example runs.
|
||||
def self.create(hooks = Spectator::ExampleHooks.empty, &block)
|
||||
group = Spectator::RootExampleGroup.new(hooks)
|
||||
def self.create(hooks = Spectator::ExampleHooks.empty, conditions = Spectator::ExampleConditions.empty, &block)
|
||||
group = Spectator::RootExampleGroup.new(hooks, conditions)
|
||||
values = Spectator::Internals::SampleValues.empty
|
||||
new(group, values).tap do |example|
|
||||
group.children = [example.as(Spectator::ExampleComponent)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue