Sha256: d8669976beba1ae4745d734e313dfef0de413cedca80e239da0755a681f4aeca

Contents?: true

Size: 939 Bytes

Versions: 3

Compression:

Stored size: 939 Bytes

Contents

describe Opsicle::OpsworksAdapter do
  let(:aws_opsworks_client) do
    double(
     :aws_opsworks_client,
     describe_layers: double(:layers, layers: []),
     start_instance: true
    )
  end
  let(:client) { double(:client, opsworks: aws_opsworks_client) }

  subject { described_class.new(client) }

  describe "#get_layers" do
    let(:get_layers) { subject.get_layers(:stack_id) }

    it "should gather an array of layers for this opsworks client" do
      expect(get_layers).to be_empty
    end

    it "should call describe_layers on the opsworks client" do
      expect(aws_opsworks_client).to receive(:describe_layers).with(stack_id: :stack_id)
      get_layers
    end
  end

  describe "#start_instance" do
    it "should call start_instance on the opsworks client" do
      expect(aws_opsworks_client).to receive(:start_instance).with(instance_id: :instance_id)
      subject.start_instance(:instance_id)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
opsicle-2.11.3 spec/opsicle/opsworks_adapter_spec.rb
opsicle-2.11.1 spec/opsicle/opsworks_adapter_spec.rb
opsicle-2.11.0 spec/opsicle/opsworks_adapter_spec.rb