Sha256: c7a20d24d9d11a67417fa33cac0df1e5b5d8259e94b4c7ca5c1a1d21278816a1
Contents?: true
Size: 1.25 KB
Versions: 15
Compression:
Stored size: 1.25 KB
Contents
describe Elasticity::BootstrapAction do subject do Elasticity::BootstrapAction.new('script', 'arg1', 'arg2') end describe '.initialize' do it 'should set the fields appropriately' do expect(subject.name).to eql('Elasticity Bootstrap Action') expect(subject.script).to eql('script') expect(subject.arguments).to eql(%w(arg1 arg2)) end end describe '#to_aws_bootstrap_action' do let(:aws_bootstrap_step) { { :name => 'Elasticity Bootstrap Action', :script_bootstrap_action => { :path => 'script' } } } context 'when there are no arguments' do let(:bootstrap_action) { Elasticity::BootstrapAction.new('script') } it 'should create a proper bootstrap action' do expect(bootstrap_action.to_aws_bootstrap_action).to eq(aws_bootstrap_step) end end context 'when there are arguments' do let(:bootstrap_action) { Elasticity::BootstrapAction.new('script', 'arg1', 'arg2') } before do aws_bootstrap_step[:script_bootstrap_action][:args] = %w(arg1 arg2) end it 'should create a proper bootstrap action' do expect(subject.to_aws_bootstrap_action).to be_a_hash_including(aws_bootstrap_step) end end end end
Version data entries
15 entries across 15 versions & 1 rubygems