summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklós Fazekas <mfazekas@szemafor.com>2020-02-06 12:27:19 +0100
committerGitHub <noreply@github.com>2020-02-06 12:27:19 +0100
commitf710a280a60ea852e88c6037c6087a50d4da1ebe (patch)
tree1ae22bc77070c18c692d50980a7e5542920de7d7
parenta2c486ccc3d87c1c69b8ed69d611e6083ad5626b (diff)
parent357821f55fa87284f415b1f712e94d6120277d3c (diff)
downloadnet-ssh-f710a280a60ea852e88c6037c6087a50d4da1ebe.tar.gz
Merge pull request #739 from mfazekas/mfazekas-rubyversions-update
Fix travis ci errors + update ruby versions
-rw-r--r--.travis.yml9
-rw-r--r--net-ssh.gemspec2
-rw-r--r--test/connection/test_session.rb14
3 files changed, 13 insertions, 12 deletions
diff --git a/.travis.yml b/.travis.yml
index c18dd23..a763f70 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,10 +7,11 @@ addon:
gateway.netssh
rvm:
- - 2.3.7
- - 2.4.5
- - 2.5.3
- - 2.6.2
+ - 2.3.8
+ - 2.4.8
+ - 2.5.7
+ - 2.6.5
+ - 2.7.0
- jruby-9.2.8.0
- rbx-3.107
- ruby-head
diff --git a/net-ssh.gemspec b/net-ssh.gemspec
index ef40cb9..df564ed 100644
--- a/net-ssh.gemspec
+++ b/net-ssh.gemspec
@@ -38,7 +38,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "bundler", ">= 1.17"
spec.add_development_dependency "minitest", "~> 5.10"
- spec.add_development_dependency "mocha", ">= 1.2.1"
+ spec.add_development_dependency "mocha", "~> 1.11.2"
spec.add_development_dependency "rake", "~> 12.0"
spec.add_development_dependency "rubocop", "~> 0.74.0"
end
diff --git a/test/connection/test_session.rb b/test/connection/test_session.rb
index 486cc63..91e3ea9 100644
--- a/test/connection/test_session.rb
+++ b/test/connection/test_session.rb
@@ -311,15 +311,15 @@ module Connection
end
def test_channel_close_packet_should_be_routed_to_corresponding_channel_and_channel_should_be_closed_and_removed
- session.channels[14] = stub("channel") do
+ session.channels[14] = stub("channel").tap do |channel|
# this simulates the case where we closed the channel first, sent
# CHANNEL_CLOSE to server and are waiting for server's response.
- expects(:local_closed?).returns(true)
- expects(:do_close)
- expects(:close).with
- expects(:remote_closed!).with
- expects(:remote_closed?).with.returns(true)
- expects(:local_id).returns(14)
+ channel.expects(:local_closed?).returns(true)
+ channel.expects(:do_close)
+ channel.expects(:close).with
+ channel.expects(:remote_closed!).with.at_least_once
+ channel.expects(:remote_closed?).with.returns(true)
+ channel.expects(:local_id).returns(14)
end
transport.return(CHANNEL_CLOSE, :long, 14)