Sha256: 59c55f1ffc98663071af0d44accc0b10ef163ac7cb1a5076821ba159c4e708b8

Contents?: true

Size: 723 Bytes

Versions: 10

Compression:

Stored size: 723 Bytes

Contents

require 'gir_ffi_test_helper'

describe GirFFI::InfoExt::ICallableInfo do
  let(:klass) do
    Class.new do
      include GirFFI::InfoExt::ICallableInfo
    end
  end
  let(:callable_info) { klass.new }

  describe '#argument_ffi_types' do
    describe 'for a simple callable with several arguments' do
      before do
        allow(arg_info1 = Object.new).to receive(:to_ffi_type).and_return :type1
        allow(arg_info2 = Object.new).to receive(:to_ffi_type).and_return :type2
        allow(callable_info).to receive(:args).and_return [arg_info1, arg_info2]
      end

      it 'returns the ffi types of the arguments' do
        callable_info.argument_ffi_types.must_equal [:type1, :type2]
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
gir_ffi-0.9.2 test/gir_ffi/info_ext/i_callable_info_test.rb
gir_ffi-0.9.1 test/gir_ffi/info_ext/i_callable_info_test.rb
gir_ffi-0.9.0 test/gir_ffi/info_ext/i_callable_info_test.rb
gir_ffi-0.8.6 test/gir_ffi/info_ext/i_callable_info_test.rb
gir_ffi-0.8.5 test/gir_ffi/info_ext/i_callable_info_test.rb
gir_ffi-0.8.4 test/gir_ffi/info_ext/i_callable_info_test.rb
gir_ffi-0.8.3 test/gir_ffi/info_ext/i_callable_info_test.rb
gir_ffi-0.8.2 test/gir_ffi/info_ext/i_callable_info_test.rb
gir_ffi-0.8.1 test/gir_ffi/info_ext/i_callable_info_test.rb
gir_ffi-0.8.0 test/gir_ffi/info_ext/i_callable_info_test.rb