Sha256: 648124b922158ee6e5fafcdfdf33416a0fea3b0c44f79fedf015cdc167cfe6f1

Contents?: true

Size: 1006 Bytes

Versions: 15

Compression:

Stored size: 1006 Bytes

Contents

require 'spec_helper'

describe SimpleDeploy::Stack::Execute do
  include_context 'stubbed config'
  include_context 'double stubbed stack', :name        => 'my_stack',
                                          :environment => 'my_env'

  before do
    @ssh_mock = mock 'ssh'
    options = { :instances   => @instances,
                :environment => @environment,
                :ssh_user    => @ssh_user,
                :ssh_key     => @ssh_key,
                :stack       => @stack_stub,
                :name        => @name }


    SimpleDeploy::Stack::SSH.should_receive(:new).
                             with(options).
                             and_return @ssh_mock
    @execute = SimpleDeploy::Stack::Execute.new options
  end

  it "should call execute with the given options" do
    options = { :sudo => true, :command => 'uname' }
    @ssh_mock.should_receive(:execute).
              with(options).
              and_return true
    @execute.execute(options).should be_true
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
simple_deploy-0.8.2 spec/stack/execute_spec.rb
simple_deploy-0.8.2.beta1 spec/stack/execute_spec.rb
simple_deploy-0.8.1.beta1 spec/stack/execute_spec.rb
simple_deploy-0.8.0 spec/stack/execute_spec.rb
simple_deploy-0.7.8 spec/stack/execute_spec.rb
simple_deploy-0.7.7 spec/stack/execute_spec.rb
simple_deploy-0.7.7.beta.1 spec/stack/execute_spec.rb
simple_deploy-0.7.6 spec/stack/execute_spec.rb
simple_deploy-0.7.6.beta.6 spec/stack/execute_spec.rb
simple_deploy-0.7.6.beta.5 spec/stack/execute_spec.rb
simple_deploy-0.7.6.beta.3 spec/stack/execute_spec.rb
simple_deploy-0.7.6.beta.1 spec/stack/execute_spec.rb
simple_deploy-0.7.5 spec/stack/execute_spec.rb
simple_deploy-0.7.4 spec/stack/execute_spec.rb
simple_deploy-0.7.3 spec/stack/execute_spec.rb