Sha256: 50ea2bb23e115d092ffcc8239cade70f4bc6292a0cc86a0543dece3375d6e8cb
Contents?: true
Size: 1.16 KB
Versions: 3
Compression:
Stored size: 1.16 KB
Contents
require 'test_helper' describe Gtk::Image do describe '.new_from_icon_name' do it 'works when called with a symbol' do result = Gtk::Image.new_from_icon_name('hi', :dialog) result.must_be_instance_of Gtk::Image end it 'works when called with an integer' do result = Gtk::Image.new_from_icon_name('hi', 4) result.must_be_instance_of Gtk::Image end end describe '.new_from_gicon' do let(:gicon) { Gio::ThemedIcon.new('hi') } it 'works when called with a symbol' do result = Gtk::Image.new_from_gicon(gicon, :dialog) result.must_be_instance_of Gtk::Image end it 'works when called with an integer' do result = Gtk::Image.new_from_gicon(gicon, 4) result.must_be_instance_of Gtk::Image end end describe '#set_from_gicon' do let(:gicon) { Gio::ThemedIcon.new('gnome') } let(:image) { Gtk::Image.new } it 'works when called with a symbol' do image.set_from_gicon(gicon, :dialog) image.get_gicon.must_equal [gicon, 6] end it 'works when called with an integer' do image.set_from_gicon(gicon, 4) image.get_gicon.must_equal [gicon, 4] end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
gir_ffi-gtk-0.14.1 | test/gir_ffi-gtk/image_test.rb |
gir_ffi-gtk-0.14.0 | test/gir_ffi-gtk/image_test.rb |
gir_ffi-gtk-0.13.1 | test/gir_ffi-gtk/image_test.rb |