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"
|
||||
end
|
||||
|
||||
# Dummy instance.
|
||||
def instance
|
||||
nil
|
||||
end
|
||||
|
||||
# Run the example that always produces an error.
|
||||
private def run_instance
|
||||
raise "Oops"
|
||||
|
|
|
@ -5,6 +5,11 @@ class FailingExample < Spectator::RunnableExample
|
|||
"FAIL"
|
||||
end
|
||||
|
||||
# Dummy instance.
|
||||
def instance
|
||||
nil
|
||||
end
|
||||
|
||||
# Run the example that always fails.
|
||||
private def run_instance
|
||||
report_expectations(0, 1)
|
||||
|
|
|
@ -5,6 +5,11 @@ class PassingExample < Spectator::RunnableExample
|
|||
"PASS"
|
||||
end
|
||||
|
||||
# Dummy instance.
|
||||
def instance
|
||||
nil
|
||||
end
|
||||
|
||||
# Run the example that always passes.
|
||||
# If this doesn't something broke.
|
||||
private def run_instance
|
||||
|
|
|
@ -6,6 +6,11 @@ class SpyExample < Spectator::RunnableExample
|
|||
"SPY"
|
||||
end
|
||||
|
||||
# Dummy instance.
|
||||
def instance
|
||||
nil
|
||||
end
|
||||
|
||||
# Captures the sample values when the example is created.
|
||||
def initialize(group, @sample_values)
|
||||
super(group, @sample_values)
|
||||
|
|
|
@ -4,6 +4,10 @@ class ConcretePendingExample < Spectator::PendingExample
|
|||
def what
|
||||
"PENDING_TEST_EXAMPLE"
|
||||
end
|
||||
|
||||
def instance
|
||||
nil
|
||||
end
|
||||
end
|
||||
|
||||
def new_pending_example(group : Spectator::ExampleGroup? = nil)
|
||||
|
|
Loading…
Reference in a new issue