Sha256: e36f5677c53ed96c13a42aa1c4b8aeac90bc363740bed27a6d31246bbedc6357
Contents?: true
Size: 837 Bytes
Versions: 1
Compression:
Stored size: 837 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::ConfirmEraseDialog do let(:parent) { Gtk::Window.new :toplevel } it "works" do expect { described_class.new parent, "foo-file" }.not_to raise_error end describe "erase?" do let(:instance) { described_class.new parent, "foo-file" } let(:dialog) { instance.dialog } it "returns false when response is cancel" do allow(dialog).to receive(:run).and_return(Gtk::ResponseType::CANCEL) expect(instance.erase?).to be false end it "returns true when response is OK" do allow(dialog).to receive(:run).and_return(Gtk::ResponseType::OK) expect(instance.erase?).to be true end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
alexandria-book-collection-manager-0.7.10 | spec/alexandria/ui/confirm_erase_dialog_spec.rb |