spec/shelly/app_spec.rb in shelly-0.1.21 vs spec/shelly/app_spec.rb in shelly-0.1.22

- old
+ new

@@ -251,10 +251,18 @@ @client.should_receive(:deploy_log).with("foo-staging", "2011-11-29-11-50-16") @app.deploy_log("2011-11-29-11-50-16") end end + describe "#database_backups" do + it "should add limit parameter" do + @client.stub_chain(:database_backups, :map) + @client.should_receive(:database_backups).with("foo-staging") + @app.database_backups + end + end + describe "#database_backup" do before do @description = { "filename" => "backup.tar.gz", "size" => 1234, @@ -310,15 +318,24 @@ describe "#rake" do it "should return result of rake task" do @client.stub(:console).and_return( {"host" => "console.example.com", "port" => "40010", "user" => "foo"}) - @app.should_receive(:exec).with("ssh -o StrictHostKeyChecking=no -p 40010 -l foo console.example.com rake_runner \"test\"") + @app.should_receive(:exec).with("ssh -o StrictHostKeyChecking=no -p 40010 -l foo -t console.example.com rake_runner \"test\"") @app.rake("test") end end + describe "#dbconsole" do + it "should return result of dbconsole" do + @client.stub(:console).and_return( + {"host" => "console.example.com", "port" => "40010", "user" => "foo"}) + @app.should_receive(:exec).with("ssh -o StrictHostKeyChecking=no -p 40010 -l foo -t console.example.com dbconsole") + @app.dbconsole + end + end + describe "#to_s" do it "should return code_name" do @app.to_s.should == "foo-staging" end end @@ -340,10 +357,10 @@ describe "#console" do it "should run ssh with all parameters" do @client.stub(:console).and_return( {"host" => "console.example.com", "port" => "40010", "user" => "foo"}) - @app.should_receive(:exec).with("ssh -o StrictHostKeyChecking=no -p 40010 -l foo console.example.com ") + @app.should_receive(:exec).with("ssh -o StrictHostKeyChecking=no -p 40010 -l foo -t console.example.com ") @app.console end end describe "#upload" do