spec/cli/deploy_spec.rb in simple_deploy-0.9.2 vs spec/cli/deploy_spec.rb in simple_deploy-0.10.0.beta.1
- old
+ new
@@ -7,10 +7,12 @@
include_context 'double stubbed logger'
include_context 'stubbed stack', :name => 'my_stack',
:environment => 'my_env',
:internal => false
+ before { @required = [:environment, :name, :read_from_env] }
+
describe 'deploy' do
before do
@stack_mock.stub(:attributes).and_return({})
@notifier = stub
end
@@ -22,12 +24,11 @@
:force => true,
:internal => false,
:attributes => [] }
subject.should_receive(:valid_options?).
- with(:provided => options,
- :required => [:environment, :name])
+ with(:provided => options, :required => @required)
Trollop.stub(:options).and_return(options)
SimpleDeploy::Notifier.should_receive(:new).
with(:stack_name => 'my_stack',
:environment => 'my_env').
@@ -49,12 +50,11 @@
:external => false,
:internal => false,
:attributes => [] }
subject.should_receive(:valid_options?).
- with(:provided => options,
- :required => [:environment, :name])
+ with(:provided => options, :required => @required)
Trollop.stub(:options).and_return(options)
SimpleDeploy::Notifier.should_receive(:new).
with(:stack_name => 'my_stack',
:environment => 'my_env').
@@ -79,12 +79,11 @@
:external => false,
:internal => false,
:attributes => ['foo=bah'] }
subject.should_receive(:valid_options?).
- with(:provided => options,
- :required => [:environment, :name])
+ with(:provided => options, :required => @required)
Trollop.stub(:options).and_return(options)
SimpleDeploy::Notifier.should_receive(:new).
with(:stack_name => 'my_stack',
:environment => 'my_env').
@@ -107,12 +106,11 @@
:external => false,
:internal => false,
:attributes => ['foo=bah'] }
subject.should_receive(:valid_options?).
- with(:provided => options,
- :required => [:environment, :name])
+ with(:provided => options, :required => @required)
Trollop.stub(:options).and_return(options)
SimpleDeploy::Notifier.should_receive(:new).
with(:stack_name => 'my_stack',
:environment => 'my_env').
@@ -137,11 +135,10 @@
:external => false,
:internal => false,
:attributes => [] }
subject.should_receive(:valid_options?).
- with(:provided => options,
- :required => [:environment, :name])
+ with(:provided => options, :required => @required)
Trollop.stub(:options).and_return(options)
SimpleDeploy::Notifier.should_receive(:new).
with(:stack_name => 'my_stack',
:environment => 'my_env').