Sha256: 254b651aa5ea7b723832603d98b168ffc4291da3fdee5ff1fc13f90ffceba643
Contents?: true
Size: 704 Bytes
Versions: 6
Compression:
Stored size: 704 Bytes
Contents
module Shoulda module Matchers module Doublespeak # @private class ProxyImplementation extend Forwardable DoubleImplementationRegistry.register(self, :proxy) def_delegators :stub_implementation, :returns def self.create new(StubImplementation.new) end def initialize(stub_implementation) @stub_implementation = stub_implementation end def call(double, object, args, block) stub_implementation.call(double, object, args, block) double.call_original_method(object, args, block) end protected attr_reader :stub_implementation end end end end
Version data entries
6 entries across 6 versions & 2 rubygems