Sha256: 96fd6950aad16a4c2aa448b826fb2c1e2fab855c1ef1e77f9f8bef2d504a8594

Contents?: true

Size: 455 Bytes

Versions: 8

Compression:

Stored size: 455 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
      mock(ptr = Object.new).to_object { "good-result" }
      interface.wrap(ptr).must_equal "good-result"
    end
  end

  describe ".to_ffitype" do
    it "returns :pointer" do
      interface.to_ffitype.must_equal :pointer
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
gir_ffi-0.7.7 test/gir_ffi/interface_base_test.rb
gir_ffi-0.7.6 test/gir_ffi/interface_base_test.rb
gir_ffi-0.7.5 test/gir_ffi/interface_base_test.rb
gir_ffi-0.7.4 test/gir_ffi/interface_base_test.rb
gir_ffi-0.7.3 test/gir_ffi/interface_base_test.rb
gir_ffi-0.7.2 test/gir_ffi/interface_base_test.rb
gir_ffi-0.7.1 test/gir_ffi/interface_base_test.rb
gir_ffi-0.7.0 test/gir_ffi/interface_base_test.rb