Update spec helpers to have source information

This commit is contained in:
Michael Miller 2019-02-14 15:41:59 -07:00
parent 5913a4c18f
commit 36c98db0ae
5 changed files with 48 additions and 0 deletions

View file

@ -5,6 +5,16 @@ class ErroredExample < Spectator::RunnableExample
"ERROR" "ERROR"
end end
# Dummy source file.
def source_file
__FILE__
end
# Dummy source line number.
def source_line
__LINE__
end
# Dummy instance. # Dummy instance.
def instance def instance
nil nil

View file

@ -5,6 +5,16 @@ class FailingExample < Spectator::RunnableExample
"FAIL" "FAIL"
end end
# Dummy source file.
def source_file
__FILE__
end
# Dummy source line number.
def source_line
__LINE__
end
# Dummy instance. # Dummy instance.
def instance def instance
nil nil

View file

@ -5,6 +5,16 @@ class PassingExample < Spectator::RunnableExample
"PASS" "PASS"
end end
# Dummy source file.
def source_file
__FILE__
end
# Dummy source line number.
def source_line
__LINE__
end
# Dummy instance. # Dummy instance.
def instance def instance
nil nil

View file

@ -6,6 +6,16 @@ class SpyExample < Spectator::RunnableExample
"SPY" "SPY"
end end
# Dummy source file.
def source_file
__FILE__
end
# Dummy source line number.
def source_line
__LINE__
end
# Dummy instance. # Dummy instance.
def instance def instance
nil nil

View file

@ -5,6 +5,14 @@ class ConcretePendingExample < Spectator::PendingExample
"PENDING_TEST_EXAMPLE" "PENDING_TEST_EXAMPLE"
end end
def source_file
__FILE__
end
def source_line
__LINE__
end
def instance def instance
nil nil
end end