Sha256: 163907474b0c158d626f04a02426c62753451c7fbd99b69c8627f7c6f17589bb

Contents?: true

Size: 784 Bytes

Versions: 7

Compression:

Stored size: 784 Bytes

Contents

# frozen_string_literal: true

require 'gir_ffi_test_helper'

# Tests behavior of objects in the generated GtkSource namespace.
describe 'The generated GtkSource module' do
  before do
    begin
      GirFFI.setup :GtkSource
    rescue RuntimeError
      skip 'GtkSource GIR not available'
    end
  end

  describe 'GtkSource::CompletionContext' do
    let(:instance) { GtkSource::CompletionContext.new }

    it 'allows adding proposals' do
      proposals = [
        GtkSource::CompletionItem.new('Proposal 1', 'Proposal 1', nil, 'blah 1'),
        GtkSource::CompletionItem.new('Proposal 2', 'Proposal 2', nil, 'blah 2'),
        GtkSource::CompletionItem.new('Proposal 3', 'Proposal 3', nil, 'blah 3')
      ]
      instance.add_proposals nil, proposals, true
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
gir_ffi-0.14.1 test/integration/generated_gtk_source_test.rb
gir_ffi-0.14.0 test/integration/generated_gtk_source_test.rb
gir_ffi-0.13.1 test/integration/generated_gtk_source_test.rb
gir_ffi-0.13.0 test/integration/generated_gtk_source_test.rb
gir_ffi-0.12.1 test/integration/generated_gtk_source_test.rb
gir_ffi-0.12.0 test/integration/generated_gtk_source_test.rb
gir_ffi-0.11.4 test/integration/generated_gtk_source_test.rb