mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Capture harness in spy example
This commit is contained in:
parent
4a531bd83f
commit
49deb96a11
1 changed files with 4 additions and 0 deletions
|
@ -14,10 +14,14 @@ class SpyExample < Spectator::RunnableExample
|
|||
# Sample values given to the example.
|
||||
getter sample_values : Spectator::Internals::SampleValues
|
||||
|
||||
# Harness that was used while running the example.
|
||||
getter! harness : Spectator::Internals::Harness
|
||||
|
||||
setter block : Proc(Nil)? = nil
|
||||
|
||||
# Method called by the framework to run the example code.
|
||||
private def run_instance
|
||||
@harness = Spectator::Internals::Harness.current
|
||||
if block = @block
|
||||
block.call
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue