Sha256: 908793fd8d04cb144d478159fcdbe9a1fa8ae02762f523d47e438aae751b5690

Contents?: true

Size: 822 Bytes

Versions: 13

Compression:

Stored size: 822 Bytes

Contents

require File.join(File.dirname(__FILE__), 'test_helper')

class SSHTest < Test::Unit::TestCase
  should "be able to execute a command over ssh" do
    ssh = Hydra::SSH.new(
      'localhost', # connect to this machine
      File.expand_path(File.join(File.dirname(__FILE__))), # move to the test directory
      "ruby fixtures/hello_world.rb"
    )
    response = ssh.gets
    assert_equal "Hello World", response.text
    ssh.close
  end

  should "be able to handle a large number of non-Hydra console output" do
    ssh = Hydra::SSH.new(
      'localhost', # connect to this machine
      File.expand_path(File.join(File.dirname(__FILE__))), # move to the test directory
      "ruby fixtures/many_outputs_to_console.rb"
    )
    response = ssh.gets
    assert_equal "My message", response.text
    ssh.close
  end
end

Version data entries

13 entries across 13 versions & 6 rubygems

Version Path
ngauthier-hydra-0.24.0 test/ssh_test.rb
nulogy-hydra-0.26.0 test/ssh_test.rb
arturop-hydra-0.25.0 test/ssh_test.rb
arturop-hydra-0.24.0 test/ssh_test.rb
hydra-0.24.0 test/ssh_test.rb
nulogy-hydra-0.23.2.1 test/ssh_test.rb
justinf-hydra-0.23.8 test/ssh_test.rb
justinf-hydra-0.23.7 test/ssh_test.rb
justinf-hydra-0.23.6 test/ssh_test.rb
justinf-hydra-0.23.5 test/ssh_test.rb
justinf-hydra-0.23.4 test/ssh_test.rb
arturop-hydra-0.23.4 test/ssh_test.rb
sskirby-hydra-0.23.3 test/ssh_test.rb