Skip to content

Commit 2cb3e63

Browse files
committed
Tests all passing under Ruby 1.9
1 parent 84847db commit 2cb3e63

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

test/common.rb

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@
22
require 'mocha'
33

44
begin
5-
gem 'net-ssh', ">= 2.0.0"
65
require 'net/ssh'
6+
require 'net/ssh/version'
7+
raise LoadError, "wrong version" unless Net::SSH::Version::STRING >= '1.99.0'
78
rescue LoadError
8-
$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../../net-ssh/lib"
9-
109
begin
10+
gem 'net-ssh', ">= 2.0.0"
1111
require 'net/ssh'
12-
require 'net/ssh/version'
13-
raise LoadError, "wrong version" unless Net::SSH::Version::STRING >= '1.99.0'
1412
rescue LoadError => e
1513
abort "could not load net/ssh v2 (#{e.inspect})"
1614
end
@@ -170,4 +168,4 @@ module V03; end
170168
module V04; end
171169
module V05; end
172170
module V06; end
173-
end
171+
end

test/protocol/04/test_name.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ def setup
1111
end
1212

1313
def teardown
14-
ENV['TZ'] = @save_tz
14+
if @save_tz
15+
ENV['TZ'] = @save_tz
16+
else
17+
ENV.delete('TZ')
18+
end
1519
end
1620

1721
def test_directory?
@@ -46,4 +50,4 @@ def test_longname_for_file_should_format_as_file
4650
assert_equal "-rwxr-xr-x jamis users 10240 Mar 12 03:40 test",
4751
@file.longname
4852
end
49-
end
53+
end

0 commit comments

Comments
 (0)