Refactor Net::SSH spec helpers definition and usages

This commit is contained in:
Thibault Jouan committed 2013-08-06 17:29:45 +00:00
1 parent 5d9a5f1f57
commit cff122432b
3 files changed
+29 -24

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
module NetSSHStoryHelpers
require 'net/ssh/test'
include Net::SSH::Test
def story_with_new_channel
story do |session|
ch = session.opens_channel
yield ch
ch.gets_close
ch.sends_close
end
end
def story_completed?
socket.script.events.empty?
end
end