Sha256: 32b2013bfae133e4c53b37fcb421f3a7884dd0f6b1ec652e033a03e22907f514

Contents?: true

Size: 1.17 KB

Versions: 51

Compression:

Stored size: 1.17 KB

Contents

describe 'Kumogata::Client#show_resources' do
  it 'show resources' do

    resources = run_client(:show_resources, :arguments => ['MyStack']) do |client, cf|
      stack = make_double('stack') do |obj|
        obj.should_receive(:status) { 'CREATE_COMPLETE' }
        obj.should_receive(:resource_summaries).and_return([
          {
            :logical_resource_id    => 'myEC2Instance',
            :physical_resource_id   => 'i-XXXXXXXX',
            :resource_type          => 'AWS::EC2::Instance',
            :resource_status        => 'CREATE_COMPLETE',
            :resource_status_reason => nil,
            :last_updated_timestamp => '2014-03-03 04:04:40 UTC',
          }
        ])
      end

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

      cf.should_receive(:stacks) { stacks }
    end

    expect(resources).to eq((<<-EOS).chomp)
[
  {
    "LogicalResourceId": "myEC2Instance",
    "PhysicalResourceId": "i-XXXXXXXX",
    "ResourceType": "AWS::EC2::Instance",
    "ResourceStatus": "CREATE_COMPLETE",
    "ResourceStatusReason": null,
    "LastUpdatedTimestamp": "2014-03-03 04:04:40 UTC"
  }
]
    EOS
  end
end

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
kumogata-0.5.2 spec/kumogata_show_resources_spec.rb
kumogata-0.5.2.beta2 spec/kumogata_show_resources_spec.rb
kumogata-0.5.2.beta spec/kumogata_show_resources_spec.rb
kumogata-0.5.1 spec/kumogata_show_resources_spec.rb
kumogata-0.5.0 spec/kumogata_show_resources_spec.rb
kumogata-0.4.19 spec/kumogata_show_resources_spec.rb
kumogata-0.4.18 spec/kumogata_show_resources_spec.rb
kumogata-0.4.17 spec/kumogata_show_resources_spec.rb
kumogata-0.4.16 spec/kumogata_show_resources_spec.rb
kumogata-0.4.15 spec/kumogata_show_resources_spec.rb
kumogata-0.4.14 spec/kumogata_show_resources_spec.rb
kumogata-0.4.13 spec/kumogata_show_resources_spec.rb
kumogata-0.4.12 spec/kumogata_show_resources_spec.rb
kumogata-0.4.11 spec/kumogata_show_resources_spec.rb
kumogata-0.4.10 spec/kumogata_show_resources_spec.rb
kumogata-0.4.9 spec/kumogata_show_resources_spec.rb
kumogata-0.4.8 spec/kumogata_show_resources_spec.rb
kumogata-0.4.7 spec/kumogata_show_resources_spec.rb
kumogata-0.4.6 spec/kumogata_show_resources_spec.rb
kumogata-0.4.5 spec/kumogata_show_resources_spec.rb