Sha256: 3210a77bad7a5276942de721b4a36bd49c8db9ff89f868b4452e918ee55c1b7d

Contents?: true

Size: 655 Bytes

Versions: 2

Compression:

Stored size: 655 Bytes

Contents

require 'test_helper'

describe Gtk::FileChooserDialog do
  describe '.new' do
    it 'creates a Gtk::FileChooserDialog with the right attributes' do
      dialog = Gtk::FileChooserDialog.new 'Foo', nil, :save, [['Bar', :yes]]
      dialog.title.must_equal 'Foo'
      dialog.action.must_equal :save
      button = if Gtk::MAJOR_VERSION == 3 && Gtk::MINOR_VERSION >= 12
                 dialog.header_bar.children.to_a.last
               else
                 dialog.action_area.children.to_a.last
               end
      button.label.must_equal 'Bar'
      dialog.response_for_widget(button).must_equal Gtk::ResponseType.to_int(:yes)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gir_ffi-gtk-0.14.1 test/gir_ffi-gtk/file_chooser_dialog_test.rb
gir_ffi-gtk-0.14.0 test/gir_ffi-gtk/file_chooser_dialog_test.rb