Sha256: ea2f7efc0178f96c6af9e9d8b63cc6c17e7df25e6f0884a1d69cc85814a70532

Contents?: true

Size: 584 Bytes

Versions: 19

Compression:

Stored size: 584 Bytes

Contents

RSpec.shared_context 'with a mock EC2 client' do
  let(:ec2_availability_zone_description) do
    zones = %w(eu-central-1 eu-west-1).map do |name|
      double("availability zone (#{name})", zone_name: name)
    end

    double(:availability_zone_description, availability_zones: zones)
  end

  let(:ec2_client) do
    client = double(:ec2_client, describe_availability_zones: ec2_availability_zone_description)
    allow(client).to receive(:describe_stacks) {
      fail Aws::CloudFormation::Errors::ValidationError.new(context, 'Stack does not exist.')
    }

    client
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
convection-1.0.2 spec/ec2_client_context.rb
convection-1.0.1 spec/ec2_client_context.rb
convection-1.0.0.pre.beta.10 spec/ec2_client_context.rb
convection-1.0.0.pre.beta.9 spec/ec2_client_context.rb
convection-1.0.0.pre.beta.8 spec/ec2_client_context.rb
convection-1.0.0.pre.beta.7 spec/ec2_client_context.rb
convection-1.0.0.pre.beta.6 spec/ec2_client_context.rb
convection-1.0.0.pre.beta.4 spec/ec2_client_context.rb
convection-1.0.0.pre.beta.1 spec/ec2_client_context.rb
convection-0.4.3 spec/ec2_client_context.rb
convection-0.4.2 spec/ec2_client_context.rb
convection-0.4.1 spec/ec2_client_context.rb
convection-0.4.0 spec/ec2_client_context.rb
convection-0.3.3.pre.beta.1 spec/ec2_client_context.rb
convection-0.3.2 spec/ec2_client_context.rb
convection-0.3.1 spec/ec2_client_context.rb
convection-0.3.0 spec/ec2_client_context.rb
convection-0.2.34.pre.beta.1 spec/ec2_client_context.rb
convection-0.2.33 spec/ec2_client_context.rb