Skip to content

Commit

Permalink
Merge pull request #59 from voxik/net-ssh-4-compat
Browse files Browse the repository at this point in the history
Fix compatiblity with net-ssh 4.0+
  • Loading branch information
mfazekas authored Apr 5, 2017
2 parents 9d4e24a + 9870b32 commit c1393ae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion test/test_download.rb
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ def test_download_file_should_transfer_remote_to_local_buffer

def test_download_directory_to_buffer_should_fail
expect_sftp_session :server_version => 3
assert_raises(ArgumentError) { sftp.download("/path/to/remote", StringIO.new, :recursive => true) }
Net::SSH::Test::Extensions::IO.with_test_extension do
assert_raises(ArgumentError) { sftp.download("/path/to/remote", StringIO.new, :recursive => true) }
end
end

private
Expand Down
6 changes: 4 additions & 2 deletions test/test_session.rb
Original file line number Diff line number Diff line change
Expand Up @@ -660,8 +660,10 @@ def test_unblock_bang_should_block_and_return_response

def assert_not_implemented(server_version, command, *args)
expect_sftp_session :server_version => 1
sftp.connect!
assert_raises(NotImplementedError) { sftp.send(command, *args) }
Net::SSH::Test::Extensions::IO.with_test_extension do
sftp.connect!
assert_raises(NotImplementedError) { sftp.send(command, *args) }
end
end

def assert_command_with_callback(command, *args)
Expand Down

0 comments on commit c1393ae

Please sign in to comment.