Sha256: aad6bffd55f0b52d7481535ba914b5201e8a79e3cc11a47f4ca2ed17029e71f7

Contents?: true

Size: 476 Bytes

Versions: 3

Compression:

Stored size: 476 Bytes

Contents

require 'gir_ffi_test_helper'

describe GirFFI::ObjectBase do
  let(:derived_class) { Class.new GirFFI::ObjectBase }

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

  describe '.to_ffi_type' do
    it 'returns itself' do
      derived_class.to_ffi_type.must_equal derived_class
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
gir_ffi-0.8.6 test/gir_ffi/object_base_test.rb
gir_ffi-0.8.5 test/gir_ffi/object_base_test.rb
gir_ffi-0.8.4 test/gir_ffi/object_base_test.rb