Sha256: da83aa090327a67afd3caaed77c3004898b55df4a19ac7a521c21eb06a804e9d

Contents?: true

Size: 1.23 KB

Versions: 6

Compression:

Stored size: 1.23 KB

Contents

require 'introspection_test_helper'

describe GObjectIntrospection::IPropertyInfo do
  describe "for Regress::TestObj's 'double' property" do
    let(:property_info) { get_property_introspection_data 'Regress', 'TestObj', 'double' }

    it 'returns :gdouble as its type' do
      property_info.property_type.tag.must_equal :gdouble
    end

    it 'flags the property as readable' do
      property_info.readable?.must_equal true
    end

    it 'flags the property as writeable' do
      property_info.writeable?.must_equal true
    end

    it 'flags the property as not construct-only' do
      property_info.construct_only?.must_equal false
    end
  end

  describe "for GObject::Binding's 'target-property' property" do
    let(:property_info) do
      get_property_introspection_data 'GObject', 'Binding', 'target-property'
    end

    it 'returns :utf8 as its type' do
      property_info.property_type.tag.must_equal :utf8
    end

    it 'flags the property as readable' do
      property_info.readable?.must_equal true
    end

    it 'flags the property as writeable' do
      property_info.writeable?.must_equal true
    end

    it 'flags the property as construct-only' do
      property_info.construct_only?.must_equal true
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
gir_ffi-0.9.2 test/ffi-gobject_introspection/i_property_info_test.rb
gir_ffi-0.9.1 test/ffi-gobject_introspection/i_property_info_test.rb
gir_ffi-0.9.0 test/ffi-gobject_introspection/i_property_info_test.rb
gir_ffi-0.8.6 test/ffi-gobject_introspection/i_property_info_test.rb
gir_ffi-0.8.5 test/ffi-gobject_introspection/i_property_info_test.rb
gir_ffi-0.8.4 test/ffi-gobject_introspection/i_property_info_test.rb