Sha256: f2800d81b7af0390b35d4da0dced0c26cd672ac118d97b6652c2bd875087fb30

Contents?: true

Size: 1.3 KB

Versions: 9

Compression:

Stored size: 1.3 KB

Contents

describe 'Kumogata::Client#delete' do
  it 'update a stack from Ruby template' do
    run_client(:delete, :arguments => ['MyStack'], :options => {:force => true}) do |client, cf|
      client.should_receive(:print_event_log).once
      client.should_receive(:create_event_log).once

      stack = make_double('stack') do |obj|
        obj.should_receive(:delete).with(no_args())
        obj.should_receive(:status).and_return(
            'DELETE_COMPLETE', 'DELETE_COMPLETE', 'DELETE_COMPLETE')
      end

      stacks = make_double('stacks') do |obj|
        obj.should_receive(:[])
           .with('MyStack') { stack }
      end

      cf.should_receive(:stacks) { stacks }
    end
  end

  it 'update a stack from Ruby template (detach)' do
    out = run_client(:delete, :arguments => ['MyStack'], :options => {:force => true, :detach => true}) do |client, cf|
      client.should_not_receive(:print_event_log)
      client.should_receive(:create_event_log).once

      stack = make_double('stack') do |obj|
        obj.should_receive(:delete).with(no_args())
        obj.should_receive(:status).once
      end

      stacks = make_double('stacks') do |obj|
        obj.should_receive(:[])
           .with('MyStack') { stack }
      end

      cf.should_receive(:stacks) { stacks }
    end

    expect(out).to be_nil
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
kumogata-0.5.2 spec/kumogata_delete_spec.rb
kumogata-0.5.2.beta2 spec/kumogata_delete_spec.rb
kumogata-0.5.2.beta spec/kumogata_delete_spec.rb
kumogata-0.5.1 spec/kumogata_delete_spec.rb
kumogata-0.5.0 spec/kumogata_delete_spec.rb
kumogata-0.4.19 spec/kumogata_delete_spec.rb
kumogata-0.4.18 spec/kumogata_delete_spec.rb
kumogata-0.4.17 spec/kumogata_delete_spec.rb
kumogata-0.4.16 spec/kumogata_delete_spec.rb