mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Add dummy instance values
This commit is contained in:
parent
b5edb1e9f3
commit
191eb02cbe
5 changed files with 24 additions and 0 deletions
|
@ -5,6 +5,11 @@ class ErroredExample < Spectator::RunnableExample
|
||||||
"ERROR"
|
"ERROR"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Dummy instance.
|
||||||
|
def instance
|
||||||
|
nil
|
||||||
|
end
|
||||||
|
|
||||||
# Run the example that always produces an error.
|
# Run the example that always produces an error.
|
||||||
private def run_instance
|
private def run_instance
|
||||||
raise "Oops"
|
raise "Oops"
|
||||||
|
|
|
@ -5,6 +5,11 @@ class FailingExample < Spectator::RunnableExample
|
||||||
"FAIL"
|
"FAIL"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Dummy instance.
|
||||||
|
def instance
|
||||||
|
nil
|
||||||
|
end
|
||||||
|
|
||||||
# Run the example that always fails.
|
# Run the example that always fails.
|
||||||
private def run_instance
|
private def run_instance
|
||||||
report_expectations(0, 1)
|
report_expectations(0, 1)
|
||||||
|
|
|
@ -5,6 +5,11 @@ class PassingExample < Spectator::RunnableExample
|
||||||
"PASS"
|
"PASS"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Dummy instance.
|
||||||
|
def instance
|
||||||
|
nil
|
||||||
|
end
|
||||||
|
|
||||||
# Run the example that always passes.
|
# Run the example that always passes.
|
||||||
# If this doesn't something broke.
|
# If this doesn't something broke.
|
||||||
private def run_instance
|
private def run_instance
|
||||||
|
|
|
@ -6,6 +6,11 @@ class SpyExample < Spectator::RunnableExample
|
||||||
"SPY"
|
"SPY"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Dummy instance.
|
||||||
|
def instance
|
||||||
|
nil
|
||||||
|
end
|
||||||
|
|
||||||
# Captures the sample values when the example is created.
|
# Captures the sample values when the example is created.
|
||||||
def initialize(group, @sample_values)
|
def initialize(group, @sample_values)
|
||||||
super(group, @sample_values)
|
super(group, @sample_values)
|
||||||
|
|
|
@ -4,6 +4,10 @@ class ConcretePendingExample < Spectator::PendingExample
|
||||||
def what
|
def what
|
||||||
"PENDING_TEST_EXAMPLE"
|
"PENDING_TEST_EXAMPLE"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def instance
|
||||||
|
nil
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def new_pending_example(group : Spectator::ExampleGroup? = nil)
|
def new_pending_example(group : Spectator::ExampleGroup? = nil)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue