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