Sha256: c4561d710a0907793c3c832476b84431a1fe9e1b520962489064f2dab37a9c73

Contents?: true

Size: 902 Bytes

Versions: 4

Compression:

Stored size: 902 Bytes

Contents

# frozen_string_literal: true

# This file is part of Alexandria.
#
# See the file README.md for authorship and licensing information.

require_relative "../../spec_helper"

describe Alexandria::UI::ProviderPreferencesDialog do
  let(:parent) { Gtk::Window.new :toplevel }
  let(:preferences) do
    instance_double(Alexandria::BookProviders::Preferences,
                    length: 0, read: [])
  end
  let(:provider) do
    instance_double(Alexandria::BookProviders::GenericProvider,
                    fullname: "FooProvider",
                    prefs: preferences)
  end

  it "can be instantiated" do
    described_class.new parent, provider
  end

  describe "#acquire" do
    it "works" do
      preferences_dialog = described_class.new parent, provider
      gtk_dialog = preferences_dialog.dialog
      allow(gtk_dialog).to receive(:run)

      preferences_dialog.acquire
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
alexandria-book-collection-manager-0.7.9 spec/alexandria/ui/provider_preferences_dialog_spec.rb
alexandria-book-collection-manager-0.7.8 spec/alexandria/ui/provider_preferences_dialog_spec.rb
alexandria-book-collection-manager-0.7.7 spec/alexandria/ui/provider_preferences_dialog_spec.rb
alexandria-book-collection-manager-0.7.6 spec/alexandria/ui/provider_preferences_dialog_spec.rb