Sha256: 873320495f16fba5635de87aa70e1598f436913727390a169fa902f458f1f1d2

Contents?: true

Size: 479 Bytes

Versions: 12

Compression:

Stored size: 479 Bytes

Contents

require 'gir_ffi_test_helper'

describe GirFFI::InterfaceBase do
  let(:interface) { Module.new { extend GirFFI::InterfaceBase } }

  describe '#wrap' do
    it 'delegates conversion to the wrapped pointer' do
      expect(ptr = Object.new).to receive(:to_object).and_return 'good-result'
      interface.wrap(ptr).must_equal 'good-result'
    end
  end

  describe '.to_ffi_type' do
    it 'returns :pointer' do
      interface.to_ffi_type.must_equal :pointer
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
gir_ffi-0.9.2 test/gir_ffi/interface_base_test.rb
gir_ffi-0.9.1 test/gir_ffi/interface_base_test.rb
gir_ffi-0.9.0 test/gir_ffi/interface_base_test.rb
gir_ffi-0.8.6 test/gir_ffi/interface_base_test.rb
gir_ffi-0.8.5 test/gir_ffi/interface_base_test.rb
gir_ffi-0.8.4 test/gir_ffi/interface_base_test.rb
gir_ffi-0.8.3 test/gir_ffi/interface_base_test.rb
gir_ffi-0.8.2 test/gir_ffi/interface_base_test.rb
gir_ffi-0.8.1 test/gir_ffi/interface_base_test.rb
gir_ffi-0.8.0 test/gir_ffi/interface_base_test.rb
gir_ffi-0.7.10 test/gir_ffi/interface_base_test.rb
gir_ffi-0.7.9 test/gir_ffi/interface_base_test.rb