Sha256: 6b3c099ee1fd075d14b1233c2e50b0fdbb3f5e2544eb0699793dbd5f4574e3b3

Contents?: true

Size: 747 Bytes

Versions: 3

Compression:

Stored size: 747 Bytes

Contents

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

class GtkOverridesTest < Test::Unit::TestCase
  context "The Gtk.init function" do
    setup do
      cleanup_module :Gtk
      GirFFI.setup :Gtk
    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

3 entries across 3 versions & 1 rubygems

Version Path
gir_ffi-0.0.8 test/gtk_overrides_test.rb
gir_ffi-0.0.7 test/gtk_overrides_test.rb
gir_ffi-0.0.6 test/gtk_overrides_test.rb