Sha256: 7baba1a793530778e767b8715c42578391ad10c6c3294a1898aa382f5263467b

Contents?: true

Size: 1.11 KB

Versions: 10

Compression:

Stored size: 1.11 KB

Contents

require 'common'
require 'net/ssh'

module NetSSH
  class TestStartOptions < Test::Unit::TestCase
    def setup
      authentication_session = mock('authentication_session')
      authentication_session.stubs(:authenticate).returns(true)
      Net::SSH::Authentication::Session.stubs(:new).returns(authentication_session)
      Net::SSH::Transport::Session.stubs(:new).returns(mock('transport_session'))
      Net::SSH::Connection::Session.stubs(:new).returns(mock('connection_session'))
    end

    def test_start_should_accept_keepalive_option
      assert_nothing_raised do
        options = { :keepalive => true }
        Net::SSH.start('localhost', 'testuser', options)
      end
    end

    def test_start_should_accept_keepalive_interval_option
      assert_nothing_raised do
        options = { :keepalive_interval => 10 }
        Net::SSH.start('localhost', 'testuser', options)
      end
    end

    def test_start_should_accept_send_env_option
      assert_nothing_raised do
        options = { :send_env => [ /^LC_.*$/, "LANG" ] }
        Net::SSH.start('localhost', 'testuser', options)
      end
    end
  end
end

Version data entries

10 entries across 8 versions & 3 rubygems

Version Path
honeybadger-2.4.0 vendor/gems/ruby/1.9.1/gems/net-ssh-2.9.1/test/start/test_options.rb
honeybadger-2.4.0 vendor/gems/ruby/2.2.0/gems/net-ssh-2.9.1/test/start/test_options.rb
honeybadger-2.4.0 vendor/gems/ruby/2.1.0/gems/net-ssh-2.9.1/test/start/test_options.rb
net-ssh-2.9.2.rc1 test/start/test_options.rb
net-ssh-2.9.2.beta test/start/test_options.rb
vagrant-tiktalik-0.0.3 vendor/bundle/ruby/2.0.0/gems/net-ssh-2.9.1/test/start/test_options.rb
net-ssh-2.9.1 test/start/test_options.rb
net-ssh-2.9.0 test/start/test_options.rb
net-ssh-2.8.0 test/start/test_options.rb
net-ssh-2.7.0 test/start/test_options.rb