spec/shelly/app_spec.rb in shelly-0.4.29.pre vs spec/shelly/app_spec.rb in shelly-0.4.29
- old
+ new
@@ -418,38 +418,38 @@
describe "#rake" do
it "should return result of rake task" do
@client.stub(:tunnel).and_return(
{"host" => "console.example.com", "port" => "40010", "user" => "foo"})
- @app.should_receive(:system).with("ssh -o StrictHostKeyChecking=no -p 40010 -l foo -t -t console.example.com rake_runner \"test\"")
+ @app.should_receive(:childprocess).with("ssh -o StrictHostKeyChecking=no -p 40010 -l foo -t -t console.example.com rake_runner \"test\"")
@app.rake("test")
end
end
describe "#dbconsole" do
it "should return result of dbconsole" do
@client.stub(:configured_db_server).and_return(
{"host" => "console.example.com", "port" => "40010", "user" => "foo"})
- @app.should_receive(:system).with("ssh -o StrictHostKeyChecking=no -p 40010 -l foo -t -t console.example.com start_dbconsole")
+ @app.should_receive(:childprocess).with("ssh -o StrictHostKeyChecking=no -p 40010 -l foo -t -t console.example.com start_dbconsole")
@app.dbconsole
end
end
describe "#mongoconsole" do
it "should return result of mongoconsole" do
@client.stub(:configured_db_server).and_return(
{"host" => "console.example.com", "port" => "40010", "user" => "foo"})
- @app.should_receive(:system).with("ssh -o StrictHostKeyChecking=no -p 40010 -l foo -t -t console.example.com start_mongodb")
+ @app.should_receive(:childprocess).with("ssh -o StrictHostKeyChecking=no -p 40010 -l foo -t -t console.example.com start_mongodb")
@app.mongoconsole
end
end
describe "#redis_cli" do
it "should return result of redis-cli" do
@client.stub(:configured_db_server).and_return(
{"host" => "console.example.com", "port" => "40010", "user" => "foo"})
- @app.should_receive(:system).with("ssh -o StrictHostKeyChecking=no -p 40010 -l foo -t -t console.example.com start_redis")
+ @app.should_receive(:childprocess).with("ssh -o StrictHostKeyChecking=no -p 40010 -l foo -t -t console.example.com start_redis")
@app.redis_cli
end
end
describe "#to_s" do
@@ -476,34 +476,34 @@
describe "#ssh_console" do
it "should run ssh with all parameters" do
@client.stub(:tunnel).and_return(
{"host" => "console.example.com", "port" => "40010", "user" => "foo"})
- @app.should_receive(:system).with("ssh -o StrictHostKeyChecking=no -p 40010 -l foo -t -t console.example.com ")
+ @app.should_receive(:childprocess).with("ssh -o StrictHostKeyChecking=no -p 40010 -l foo -t -t console.example.com ")
@app.ssh_console
end
context "when server passed" do
it "should request console on given server" do
@client.should_receive(:tunnel).with("foo-staging", "ssh", "app1").and_return({})
- @app.stub(:system)
+ @app.should_receive(:childprocess)
@app.console("app1")
end
end
end
describe "#console" do
it "should run ssh with all parameters" do
@client.stub(:tunnel).and_return(
{"host" => "console.example.com", "port" => "40010", "user" => "foo"})
- @app.should_receive(:system).with("ssh -o StrictHostKeyChecking=no -p 40010 -l foo -t -t console.example.com start_console")
+ @app.should_receive(:childprocess).with("ssh -o StrictHostKeyChecking=no -p 40010 -l foo -t -t console.example.com start_console")
@app.console
end
context "when server passed" do
it "should request console on given server" do
@client.should_receive(:tunnel).with("foo-staging", "ssh", "app1").and_return({})
- @app.stub(:system)
+ @app.should_receive(:childprocess)
@app.console("app1")
end
end
end