Add dummy instance values

This commit is contained in:
Michael Miller 2019-01-01 17:06:24 -07:00
parent b5edb1e9f3
commit 191eb02cbe
5 changed files with 24 additions and 0 deletions

View file

@ -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"

View file

@ -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)

View file

@ -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

View file

@ -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)

View file

@ -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)