Sha256: 6bfe6e38cff70e096541054764ba6c11ef96590aaf889575122e2c14bcc0be6e

Contents?: true

Size: 1.08 KB

Versions: 28

Compression:

Stored size: 1.08 KB

Contents

require 'spec_helper'
require 'net/ssh'

module Beaker
  describe SshConnection do
    let( :host )    { 'my_host' }
    let( :user )    { 'root'    }
    let( :options ) { Hash.new  }
    subject(:connection) { SshConnection.new host, user, options }

    it 'self.connect creates connects and returns a proxy for that connection' do
      # grrr
      Net::SSH.should_receive(:start).with( host, user, options )
      connection_constructor = SshConnection.connect host, user, options
      expect( connection_constructor ).to be_a_kind_of SshConnection
    end

    it 'connect creates a new connection' do
      Net::SSH.should_receive( :start ).with( host, user, options )
      connection.connect
    end

    it 'connect caches its connection' do
      Net::SSH.should_receive( :start ).with( host, user, options ).once.and_return true
      connection.connect
      connection.connect
    end

    it 'close?'
    it 'execute'
    it 'request_terminal_for'
    it 'register_stdout_for'
    it 'register_stderr_for'
    it 'register_exit_code_for'
    it 'process_stdin_for'
    it 'scp'

  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
beaker-1.12.2 spec/beaker/ssh_connection_spec.rb
beaker-1.12.1 spec/beaker/ssh_connection_spec.rb
beaker-1.12.0 spec/beaker/ssh_connection_spec.rb
beaker-1.11.2 spec/beaker/ssh_connection_spec.rb
beaker-1.11.1 spec/beaker/ssh_connection_spec.rb
beaker-1.11.0 spec/beaker/ssh_connection_spec.rb
beaker-1.10.0 spec/beaker/ssh_connection_spec.rb
beaker-1.9.1 spec/beaker/ssh_connection_spec.rb
beaker-1.9.0 spec/beaker/ssh_connection_spec.rb
beaker-1.8.2 spec/beaker/ssh_connection_spec.rb
beaker-1.8.1 spec/beaker/ssh_connection_spec.rb
beaker-1.8.0 spec/beaker/ssh_connection_spec.rb
beaker-1.7.0 spec/beaker/ssh_connection_spec.rb
beaker-1.6.2 spec/beaker/ssh_connection_spec.rb
beaker-1.6.1 spec/beaker/ssh_connection_spec.rb
beaker-1.6.0 spec/beaker/ssh_connection_spec.rb
beaker-1.5.0 spec/beaker/ssh_connection_spec.rb
beaker-1.4.1 spec/beaker/ssh_connection_spec.rb
beaker-1.4.0 spec/beaker/ssh_connection_spec.rb
beaker-1.3.2 spec/beaker/ssh_connection_spec.rb