Sha256: aec496bf1a69d395f49d8e4b583f2d37f30b42d1748b337892d9826b8b812c19

Contents?: true

Size: 1.04 KB

Versions: 3

Compression:

Stored size: 1.04 KB

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

    it "allows the can-activate-push property to be read" do
      _(instance.get_property("can-activate-push")).must_equal true
    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

3 entries across 3 versions & 1 rubygems

Version Path
gir_ffi-0.15.3 test/integration/generated_gst_test.rb
gir_ffi-0.15.2 test/integration/generated_gst_test.rb
gir_ffi-0.15.1 test/integration/generated_gst_test.rb