Sha256: 59f6cff79eec708a9fadf312f7a85ab3435899467f7f614b479b97c13e97f450

Contents?: true

Size: 791 Bytes

Versions: 3

Compression:

Stored size: 791 Bytes

Contents

# frozen_string_literal: true

require "introspection_test_helper"

describe GObjectIntrospection::GObjectTypeInit do
  describe "Lib" do
    it "represents the gobject-2.0 library" do
      _(GObjectIntrospection::GObjectTypeInit::Lib.ffi_libraries.first.name)
        .must_match(/gobject-2\.0/)
    end

    it "provides the g_type_init function" do
      _(GObjectIntrospection::GObjectTypeInit::Lib).must_respond_to :g_type_init
    end
  end

  describe ".type_init" do
    it "calls the g_type_init function from the gobject-2.0 library" do
      allow(GObjectIntrospection::GObjectTypeInit::Lib).to receive(:g_type_init)

      GObjectIntrospection::GObjectTypeInit.type_init

      expect(GObjectIntrospection::GObjectTypeInit::Lib).to have_received(:g_type_init)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
gir_ffi-0.15.3 test/ffi-gobject_introspection/gobject_type_init_test.rb
gir_ffi-0.15.2 test/ffi-gobject_introspection/gobject_type_init_test.rb
gir_ffi-0.15.1 test/ffi-gobject_introspection/gobject_type_init_test.rb