Sha256: c9f8433283f4c559bf83a734a9562e6fce9c3318574c39c129d7c4fa518b7fb9

Contents?: true

Size: 868 Bytes

Versions: 12

Compression:

Stored size: 868 Bytes

Contents

require 'spec_helper'

describe SimpleDeploy::Stack::Execute do
  before do
    @ssh_mock = mock 'ssh'
    options = { :config      => @config,
                :instances   => @instances,
                :environment => @environment,
                :ssh_user    => @ssh_user,
                :ssh_key     => @ssh_key,
                :stack       => @stack,
                :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

12 entries across 12 versions & 1 rubygems

Version Path
simple_deploy-0.7.2 spec/stack/execute_spec.rb
simple_deploy-0.7.2.beta.1 spec/stack/execute_spec.rb
simple_deploy-0.7.1 spec/stack/execute_spec.rb
simple_deploy-0.7.0 spec/stack/execute_spec.rb
simple_deploy-0.6.7 spec/stack/execute_spec.rb
simple_deploy-0.6.6 spec/stack/execute_spec.rb
simple_deploy-0.6.5 spec/stack/execute_spec.rb
simple_deploy-0.6.4 spec/stack/execute_spec.rb
simple_deploy-0.6.3 spec/stack/execute_spec.rb
simple_deploy-0.6.2 spec/stack/execute_spec.rb
simple_deploy-0.6.1 spec/stack/execute_spec.rb
simple_deploy-0.6.0 spec/stack/execute_spec.rb