Sha256: 412ea2868a44838014b09e50089f665cebd6d36dd9af7263526cb7d6ad0bd160

Contents?: true

Size: 673 Bytes

Versions: 6

Compression:

Stored size: 673 Bytes

Contents

class TestAdapter < Looksee::Adapter::Base
  module Mixin
    def use_test_adapter
      before { Looksee.adapter = TestAdapter.new }
      after { Looksee.adapter = NATIVE_ADAPTER }
    end
  end

  def lookup_modules(object)
    ancestors[object]
  end

  def internal_undefined_instance_methods(mod)
    undefined_methods[mod]
  end

  def singleton_instance(object)
    NATIVE_ADAPTER.singleton_instance(object)
  end

  def set_undefined_methods(mod, names)
    self.undefined_methods[mod] = names
  end

  def ancestors
    @ancestors ||= Hash.new { |h, k| h[k] = [] }
  end

  def undefined_methods
    @undefined_methods ||= Hash.new { |h, k| h[k] = [] }
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
looksee-5.0.0 spec/support/test_adapter.rb
looksee-4.4.0 spec/support/test_adapter.rb
looksee-4.2.0 spec/support/test_adapter.rb
looksee-4.1.0 spec/support/test_adapter.rb
looksee-4.0.0-universal-java-1.8 spec/support/test_adapter.rb
looksee-4.0.0 spec/support/test_adapter.rb