Sha256: 384919c63550569125728b8f46a1df2d60907ec14c4ce7c78d129aa83b372ab8

Contents?: true

Size: 722 Bytes

Versions: 2

Compression:

Stored size: 722 Bytes

Contents

require File.expand_path('test_helper.rb', File.dirname(__FILE__))

class GtkOverridesTest < MiniTest::Spec
  context "The Gtk.init function" do
    setup do
      GirFFI.setup :Gtk, '2.0'
    end

    should "not take any arguments" do
      assert_raises(ArgumentError) { Gtk.init 1, ["foo"] }
      assert_raises(ArgumentError) { Gtk.init ["foo"] }
      assert_nothing_raised { Gtk.init }
    end

    # FIXME: The following test doesn't actually work.
    # In practice however, the Gtk.init function does exactly this.
    if false
    should "process ARGV, removing Gtk+ options" do
      ARGV.replace ["foo", "--g-fatal-warnings"]
      Gtk.init
      assert_same_elements ["foo"], ARGV
    end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gir_ffi-0.0.10 test/gtk_overrides_test.rb
gir_ffi-0.0.9 test/gtk_overrides_test.rb