Sha256: 9e0effd10cb7be3b1ef6b51b46702211d6cb8e6d1e0f69fba92ee3f08a29e58d

Contents?: true

Size: 686 Bytes

Versions: 5

Compression:

Stored size: 686 Bytes

Contents

require "spec_helper"
require "opsicle/deploy"

module Opsicle
  describe Deploy do
    subject { Deploy.new('derp') }

    context "#execute" do
      let(:client) { double }
      before do
        Client.stub(:new).with('derp').and_return(client)
      end

      it "creates a new deployment" do
        subject.should_receive(:open_deploy).with('derp')
        client.should_receive(:run_command).with('deploy').and_return({deployment_id: 'derp'})
        subject.execute
      end
    end

    context "#client" do
      it "generates a new aws client from the given configs" do
        Client.should_receive(:new).with('derp')
        subject.client
      end
    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
opsicle-0.1.0 spec/opsicle/deploy_spec.rb
opsicle-0.0.4 spec/opsicle/deploy_spec.rb
opsicle-0.0.3 spec/opsicle/deploy_spec.rb
opsicle-0.0.2 spec/opsicle/deploy_spec.rb
opsicle-0.0.1 spec/opsicle/deploy_spec.rb