Sha256: 05a3b48228b5f6d1d3c3226a6f1e766b311c8d7a888d346ddc325801515d4a95
Contents?: true
Size: 1.04 KB
Versions: 45
Compression:
Stored size: 1.04 KB
Contents
require "spec_helper" require "opsicle" module Opsicle describe ListInstances do subject { ListInstances.new('derp') } context "#execute" do let(:client) { double } let(:layers) { [ { layer_id: 1, name: "Layer 1" }, { layer_id: 2, name: "Layer 2" }] } let(:instances) { [ { hostname: 'test', layer_ids: [1], status: 'online', instance_id: 'opsworks-instance-id'}, { hostname: 'test2', layer_ids: [2], status: 'online', instance_id: 'opsworks-instance-id2'}, ] } before do allow(Client).to receive(:new).with('derp').and_return(client) end it "shows a table with all of the instances for the stack from OpsWorks" do expect(subject).to receive(:get_instances).and_return(instances) expect(subject).to receive(:print).with(instances) subject.execute end end context "#client" do it "generates a new aws client from the given configs" do expect(Client).to receive(:new).with('derp') subject.client end end end end
Version data entries
45 entries across 45 versions & 1 rubygems