Sha256: 08175fd9455ada15991184895c45df060572bea95c2c702e36f3fe0073c48c26

Contents?: true

Size: 479 Bytes

Versions: 25

Compression:

Stored size: 479 Bytes

Contents

require 'spec_helper'

require 'ffi'

module LibyajlTestFFI
  extend ::FFI::Library

  libname = ::FFI.map_library_name("yajl")
  libpath = File.expand_path(File.join(Libyajl2.opt_path, libname))

  ffi_lib libpath

  attach_function :yajl_gen_alloc, [:pointer], :pointer
end

describe "when loading the library with FFI" do
  it "we can get back an FFI::Pointer from yajl_gen_alloc" do
    expect(LibyajlTestFFI.yajl_gen_alloc(nil)).to be_an_instance_of(FFI::Pointer)
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
libyajl2-1.2.0 spec/ffi_spec.rb
libyajl2-1.1.0 spec/ffi_spec.rb
libyajl2-1.0.1 spec/ffi_spec.rb
libyajl2-0.1.18 spec/ffi_spec.rb
libyajl2-0.1.17 spec/ffi_spec.rb
libyajl2-0.1.16 spec/ffi_spec.rb
libyajl2-0.1.15 spec/ffi_spec.rb
libyajl2-0.1.14 spec/ffi_spec.rb
libyajl2-0.1.13 spec/ffi_spec.rb
libyajl2-0.1.12 spec/ffi_spec.rb
libyajl2-0.1.11 spec/ffi_spec.rb
libyajl2-0.1.10 spec/ffi_spec.rb
libyajl2-0.1.9 spec/ffi_spec.rb
libyajl2-0.1.8 spec/ffi_spec.rb
libyajl2-0.1.7 spec/ffi_spec.rb
libyajl2-0.1.6 spec/ffi_spec.rb
libyajl2-0.1.5 spec/ffi_spec.rb
libyajl2-0.1.4 spec/ffi_spec.rb
libyajl2-0.1.3 spec/ffi_spec.rb
libyajl2-0.1.2 spec/ffi_spec.rb