From 4d7e11ceeb9885745abaa8376e1564d18e24f05f Mon Sep 17 00:00:00 2001 From: Thibault Jouan Date: Mon, 31 Mar 2014 08:24:34 +0000 Subject: [PATCH] Patch net-ssh story helpers for 2.8.0 --- spec/support/net_ssh_story_helpers.rb | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/spec/support/net_ssh_story_helpers.rb b/spec/support/net_ssh_story_helpers.rb index d86a039..593e5c8 100644 --- a/spec/support/net_ssh_story_helpers.rb +++ b/spec/support/net_ssh_story_helpers.rb @@ -1,6 +1,21 @@ -module NetSSHStoryHelpers - require 'net/ssh/test' +require 'net/ssh/test' +if Net::SSH::Version::CURRENT >= Net::SSH::Version[2, 8, 0] + module Net + module SSH + module Test + class Socket + def open(host, port, connections_options = nil) + @host, @port = host, port + self + end + end + end + end + end +end + +module NetSSHStoryHelpers include Net::SSH::Test def story_with_new_channel