spec/notifier_spec.rb in simple_deploy-0.5.5 vs spec/notifier_spec.rb in simple_deploy-0.5.6
- old
+ new
@@ -21,12 +21,14 @@
end
it "should support a basic start message" do
campfire_mock = mock 'campfire mock'
+ @config_mock.should_receive(:region).with('test').and_return('us-west-1')
+
SimpleDeploy::Notifier::Campfire.should_receive(:new).and_return campfire_mock
- campfire_mock.should_receive(:send).with "Deployment to stack_name started."
+ campfire_mock.should_receive(:send).with "Deployment to stack_name in us-west-1 started."
@notifier.send_deployment_start_message
end
it "should include the github app & chef links in the completed message" do
@@ -34,10 +36,11 @@
campfire_mock = mock 'campfire mock'
environment_mock = mock 'environment mock'
@config_mock.should_receive(:environment).
with('test').
and_return environment_mock
+ @config_mock.should_receive(:region).with('test').and_return('us-west-1')
Stackster::Stack.should_receive(:new).
with(:environment => 'test',
:name => 'stack_name',
:config => environment_mock,
:logger => @logger_mock).
@@ -48,10 +51,10 @@
'app' => 'appsha',
'chef_repo' => 'chefsha' })
SimpleDeploy::Notifier::Campfire.should_receive(:new).
and_return campfire_mock
campfire_mock.should_receive(:send).
- with "Deployment to stack_name complete. App: http://github.com/user/app/commit/appsha Chef: http://github.com/user/chef_repo/commit/chefsha"
+ with "Deployment to stack_name in us-west-1 complete. App: http://github.com/user/app/commit/appsha Chef: http://github.com/user/chef_repo/commit/chefsha"
@notifier.send_deployment_complete_message
end
it "should send a message to each listed notification endpoint" do
campfire_mock = mock 'campfire mock'