spec/opsicle/client_spec.rb in opsicle-0.18.0 vs spec/opsicle/client_spec.rb in opsicle-0.18.1
- old
+ new
@@ -6,11 +6,11 @@
subject { Client.new('derp') }
let(:aws_client) { double }
let(:config) { double }
before do
ow_stub = double
- allow(config).to receive(:opsworks_config).and_return({ stack_id: 'stack', app_id: 'app' })
+ allow(config).to receive(:opsworks_config).and_return({ stack_id: 'stack', app_id: 'app', something_else: 'true' })
allow(ow_stub).to receive(:client).and_return(aws_client)
allow(Config).to receive(:new).and_return(config)
allow(AWS::OpsWorks).to receive(:new).and_return(ow_stub)
end
@@ -22,9 +22,14 @@
command: { name: 'deploy', args: {} },
stack_id: 'stack',
app_id: 'app'
)
)
+ subject.run_command('deploy')
+ end
+ it "removes extra options from the opsworks config" do
+ expect(config).to receive(:configure_aws!)
+ expect(aws_client).to receive(:create_deployment).with(hash_excluding(:something_else))
subject.run_command('deploy')
end
end
end
end