replaced echo script with hello script for ssh testing.

This commit is contained in:
Nick Gauthier 2010-02-06 16:23:52 -05:00
parent 86afb437c0
commit 574b5f7350
3 changed files with 6 additions and 11 deletions

View File

@ -1,7 +0,0 @@
#!/usr/bin/env ruby
# Echoes back to the sender
$stdout.sync = true
while line = $stdin.get
$stdout.write line
end

3
test/fixtures/hello_world.rb vendored Normal file
View File

@ -0,0 +1,3 @@
#!/usr/bin/env ruby
$stdout.write "{:class=>Hydra::Messages::TestMessage, :text=>\"Hello World\"}\n"
$stdout.flush

View File

@ -5,11 +5,10 @@ class SSHTest < Test::Unit::TestCase
ssh = Hydra::SSH.new(
'localhost', # connect to this machine
File.expand_path(File.join(File.dirname(__FILE__))), # move to the test directory
"ruby fixtures/echo_the_dolphin.rb"
"ruby fixtures/hello_world.rb"
)
message = Hydra::Messages::TestMessage.new
ssh.write message
assert_equal message.text, ssh.gets.text
response = ssh.gets
assert_equal "Hello World", response.text
ssh.close
end
end