Sha256: cb15d2ce49f1d650c3b45ab93efbfdd4278b659e910076ae9a7a4e566d15484b

Contents?: true

Size: 1.02 KB

Versions: 9

Compression:

Stored size: 1.02 KB

Contents

require 'test_helper'

describe Gtk::RadioButton do
  describe ".new_from_widget" do
    it "works when called with nil" do
      result = Gtk::RadioButton.new_from_widget(nil)
      result.must_be_instance_of Gtk::RadioButton
    end

    it "works when called with another radio button" do
      btn = Gtk::RadioButton.new_from_widget nil
      result = Gtk::RadioButton.new_from_widget btn
      result.must_be_instance_of Gtk::RadioButton
    end
  end

  describe "#get_group" do
    it "returns a GLib::SList object" do
      btn = Gtk::RadioButton.new_from_widget nil
      grp = btn.get_group
      assert_instance_of GLib::SList, grp
    end
  end

  describe ".new" do
    it "works when called with nil" do
      result = Gtk::RadioButton.new nil
      result.must_be_instance_of Gtk::RadioButton
    end

    it "works when called with the result of #get_group" do
      btn = Gtk::RadioButton.new_from_widget nil
      result = Gtk::RadioButton.new btn.get_group
      result.must_be_instance_of Gtk::RadioButton
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
gir_ffi-gtk-0.12.1 test/gir_ffi-gtk/radio_button_test.rb
gir_ffi-gtk-0.12.0 test/gir_ffi-gtk/radio_button_test.rb
gir_ffi-gtk-0.11.0 test/gir_ffi-gtk/radio_button_test.rb
gir_ffi-gtk-0.10.0 test/gir_ffi-gtk/radio_button_test.rb
gir_ffi-gtk-0.9.0 test/gir_ffi-gtk/radio_button_test.rb
gir_ffi-gtk-0.8.1 test/gir_ffi-gtk/radio_button_test.rb
gir_ffi-gtk-0.8.0 test/gir_ffi-gtk/radio_button_test.rb
gir_ffi-gtk-0.7.2 test/gir_ffi-gtk/radio_button_test.rb
gir_ffi-gtk-0.7.1 test/gir_ffi-gtk/radio_button_test.rb