spec/unit/configuration/setup_spec.rb in imap-backup-1.3.0 vs spec/unit/configuration/setup_spec.rb in imap-backup-1.4.0
- old
+ new
@@ -27,11 +27,11 @@
end
let(:debug) { false }
let(:modified) { false }
before :each do
- allow(Imap::Backup::Configuration::Store).to receive(:new).and_return(store)
+ allow(Imap::Backup::Configuration::Store).to receive(:new) { store }
allow(Imap::Backup).to receive(:setup_logging)
@input, @output = prepare_highline
allow(@input).to receive(:eof?).and_return(false)
allow(@input).to receive(:gets).and_return("exit\n")
allow(subject).to receive(:system)
@@ -98,11 +98,13 @@
end
let(:account) { double("Imap::Backup::Configuration::Account", run: nil) }
before do
allow(@input).to receive(:gets).and_return("add\n", "exit\n")
- allow(Imap::Backup::Configuration::Asker).to receive(:email).with(no_args).and_return("new@example.com")
- allow(Imap::Backup::Configuration::Account).to receive(:new).with(store, blank_account, anything).and_return(account)
+ allow(Imap::Backup::Configuration::Asker).to receive(:email).
+ with(no_args).and_return("new@example.com")
+ allow(Imap::Backup::Configuration::Account).to receive(:new).
+ with(store, blank_account, anything).and_return(account)
subject.run
end
it "adds account data" do