mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Reset stubs after each test
This commit is contained in:
parent
c03808dfce
commit
74eb4fc11a
2 changed files with 2 additions and 1 deletions
|
@ -12,7 +12,7 @@ module Spectator::Mocks
|
|||
@@entries = {} of Key => Entry
|
||||
|
||||
def reset : Nil
|
||||
@entries.clear
|
||||
@@entries.clear
|
||||
end
|
||||
|
||||
def add_stub(object, stub : MethodStub) : Nil
|
||||
|
|
|
@ -9,6 +9,7 @@ module Spectator
|
|||
def run_impl : Result
|
||||
result = capture_result
|
||||
expectations = Harness.current.expectations
|
||||
Mocks::Registry.reset
|
||||
translate_result(result, expectations)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue