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

Version Path
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/shoulda-matchers-2.8.0/lib/shoulda/matchers/doublespeak/proxy_implementation.rb
shoulda-matchers-2.8.0 lib/shoulda/matchers/doublespeak/proxy_implementation.rb
shoulda-matchers-2.8.0.rc2 lib/shoulda/matchers/doublespeak/proxy_implementation.rb
shoulda-matchers-2.8.0.rc1 lib/shoulda/matchers/doublespeak/proxy_implementation.rb
shoulda-matchers-2.7.0 lib/shoulda/matchers/doublespeak/proxy_implementation.rb
shoulda-matchers-2.6.2 lib/shoulda/matchers/doublespeak/proxy_implementation.rb