Sha256: 55377784b947cbffe54d2ad9885d746828a6bdec81906734a3266d9a3c850079

Contents?: true

Size: 606 Bytes

Versions: 3

Compression:

Stored size: 606 Bytes

Contents

# frozen_string_literal: true

require "gir_ffi_test_helper"

describe GirFFI::InfoExt::ICallbackInfo do
  let(:callback_class) do
    Class.new do
      include GirFFI::InfoExt::ICallbackInfo
    end
  end
  let(:callback_info) { callback_class.new }

  describe "#return_ffi_type" do
    it "returns the callback ffi type of the return type" do
      allow(return_type_info = Object.new).to receive(:to_callback_ffi_type).and_return :some_type
      allow(callback_info).to receive(:return_type).and_return return_type_info

      _(callback_info.return_ffi_type).must_equal :some_type
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
gir_ffi-0.15.2 test/gir_ffi/info_ext/i_callback_info_test.rb
gir_ffi-0.15.1 test/gir_ffi/info_ext/i_callback_info_test.rb
gir_ffi-0.15.0 test/gir_ffi/info_ext/i_callback_info_test.rb