mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Check expectations for anonymous double
This commit is contained in:
parent
45fe6217b4
commit
5da231a5e8
1 changed files with 1 additions and 0 deletions
|
@ -15,6 +15,7 @@ module Spectator::Mocks
|
|||
stub.call!(args, typeof(@values.fetch({{call.name.symbolize}}) { raise }))
|
||||
else
|
||||
@values.fetch({{call.name.symbolize}}) do
|
||||
return nil if ::Spectator::Harness.current.mocks.expected?(self, {{call.name.symbolize}})
|
||||
raise ::Spectator::Mocks::UnexpectedMessageError.new("#{self} received unexpected message {{call.name}}")
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue