Sha256: 17d60d5bd98be553b24070f8ab0c26cec19ce54fc48e5f3999d439e211c3a63d

Contents?: true

Size: 910 Bytes

Versions: 9

Compression:

Stored size: 910 Bytes

Contents

# frozen_string_literal: true

require 'gir_ffi_test_helper'

GirFFI.setup :Gst
Gst.init []

# Tests behavior of objects in the generated Gio namespace.
describe 'the generated Gst module' do
  describe 'Gst::FakeSink' do
    let(:instance) { Gst::ElementFactory.make('fakesink', 'sink') }

    it 'allows the handoff signal to be connected and emitted' do
      a = nil
      instance.signal_connect('handoff') { a = 10 }
      GObject.signal_emit(instance, 'handoff')
      a.must_equal 10
    end

    it 'correctly fetches the name' do
      instance.name.must_equal 'sink'
    end
  end

  describe 'Gst::AutoAudioSink' do
    let(:instance) { Gst::ElementFactory.make('autoaudiosink', 'audiosink') }

    it 'correctly fetches the name' do
      skip 'Audio sink was not created' unless instance
      instance.get_name.must_equal 'audiosink'
      instance.name.must_equal 'audiosink'
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

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