Sha256: 829be8c69a3dd0fe2e897ab8187601bb02b08b2ef71c10730ccde5f5944a4198
Contents?: true
Size: 565 Bytes
Versions: 9
Compression:
Stored size: 565 Bytes
Contents
require 'muack/mock' module Muack class Spy < Mock def initialize stub super(stub.object) @secret = stub.__mock_disps.values.flatten # steal disps end # used for Muack::Session#verify def __mock_verify @secret.each{ |defi| __mock_dispatch(defi.msg, defi.args) } super # simulate dispatching before passing to mock to verify end # used for Muack::Session#reset, but spies never leave any track def __mock_reset; end private def __mock_inject_method defi; end # spies don't leave any track end end
Version data entries
9 entries across 9 versions & 1 rubygems