Sha256: b6d1a4ee8ffb852248e920c55d63963df12825f260b1b5c9791c085a5ac46a80
Contents?: true
Size: 718 Bytes
Versions: 29
Compression:
Stored size: 718 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(call) return_value = call.double.call_original_method(call) stub_implementation.call(call.with_return_value(return_value)) return_value end protected attr_reader :stub_implementation end end end end
Version data entries
29 entries across 29 versions & 1 rubygems