spec/shelly/cli/backup_spec.rb in shelly-0.1.3 vs spec/shelly/cli/backup_spec.rb in shelly-0.1.4.pre
- old
+ new
@@ -1,8 +1,9 @@
require "spec_helper"
require "shelly/cli/backup"
require "shelly/download_progress_bar"
+require "open3"
describe Shelly::CLI::Backup do
before do
@backup = Shelly::CLI::Backup.new
Shelly::CLI::Backup.stub(:new).and_return(@backup)
@@ -190,10 +191,10 @@
fake_stdin(["yes"]) do
invoke(@backup, :restore, "better.tar.gz")
end
end
- context "on type no" do
+ context "when answering no" do
it "should cancel restore database" do
$stdout.should_receive(:puts).with("You are about restore database postgre for cloud foo-staging to state from better.tar.gz")
$stdout.should_receive(:print).with("I want to restore the database (yes/no): ")
$stdout.should_receive(:puts).with("\n")
$stdout.should_receive(:puts).with(red "Canceled")