spec/shelly/app_spec.rb in shelly-0.0.43 vs spec/shelly/app_spec.rb in shelly-0.0.44.pre
- old
+ new
@@ -80,28 +80,28 @@
it "should delete config using client" do
@client.should_receive(:app_delete_config).with("foo-staging", "path")
@app.delete_config("path")
end
end
-
+
describe "#attributes" do
before do
@response = {"web_server_ip" => "192.0.2.1", "mail_server_ip" => "192.0.2.3"}
@client.stub(:app).and_return(@response)
end
-
+
it "should fetch app attributes from API and cache them" do
@client.should_receive(:app).with("foo-staging").exactly(:once).and_return(@response)
2.times { @app.attributes }
end
-
+
describe "#web_server_ip" do
it "should return web server ip address" do
@app.web_server_ip.should == "192.0.2.1"
end
end
-
+
describe "#mail_server_ip" do
it "should return mail server ip address" do
@app.mail_server_ip.should == "192.0.2.3"
end
end
@@ -278,13 +278,19 @@
@app.create
@app.domains.should == %w(boo.shellyapp.com boo.example.com)
end
end
end
+
+ describe "#redeploy" do
+ it "should redeploy app via API" do
+ @client.should_receive(:redeploy).with("foo-staging")
+ @app.redeploy
+ end
+ end
describe "#to_s" do
it "should return code_name" do
@app.to_s.should == "foo-staging"
end
end
end
-