mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Pass test context to registry
This commit is contained in:
parent
2bc4f71edb
commit
d2e27d1e6e
2 changed files with 3 additions and 3 deletions
|
@ -59,7 +59,7 @@ module Spectator
|
|||
# The example the harness is for should be passed in.
|
||||
private def initialize(@example)
|
||||
@reporter = Expectations::ExpectationReporter.new
|
||||
@mocks = Mocks::Registry.new(@example.group.context.stubs)
|
||||
@mocks = Mocks::Registry.new(@example.group.context)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -10,8 +10,8 @@ module Spectator::Mocks
|
|||
@all_instances = {} of String => Entry
|
||||
@entries = {} of Key => Entry
|
||||
|
||||
def initialize(default_stubs)
|
||||
@all_instances = default_stubs.map do |k, v|
|
||||
def initialize(context : TestContext)
|
||||
@all_instances = context.stubs.map do |k, v|
|
||||
entry = Entry.new
|
||||
entry.stubs.concat(v)
|
||||
{k, entry}
|
||||
|
|
Loading…
Reference in a new issue