Browse files

Tests all passing under Ruby 1.9

  • Loading branch information...
1 parent 84847db commit 2cb3e6335c4e6b1d83e6cda305274cb2af2bf904 @jamis jamis committed Sep 6, 2008
Showing with 10 additions and 8 deletions.
  1. +4 −6 test/common.rb
  2. +6 −2 test/protocol/04/test_name.rb
View
10 test/common.rb
@@ -2,15 +2,13 @@
require 'mocha'
begin
- gem 'net-ssh', ">= 2.0.0"
require 'net/ssh'
+ require 'net/ssh/version'
+ raise LoadError, "wrong version" unless Net::SSH::Version::STRING >= '1.99.0'
rescue LoadError
- $LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../../net-ssh/lib"
-
begin
+ gem 'net-ssh', ">= 2.0.0"
require 'net/ssh'
- require 'net/ssh/version'
- raise LoadError, "wrong version" unless Net::SSH::Version::STRING >= '1.99.0'
rescue LoadError => e
abort "could not load net/ssh v2 (#{e.inspect})"
end
@@ -170,4 +168,4 @@ module V03; end
module V04; end
module V05; end
module V06; end
-end
+end
View
8 test/protocol/04/test_name.rb
@@ -11,7 +11,11 @@ def setup
end
def teardown
- ENV['TZ'] = @save_tz
+ if @save_tz
+ ENV['TZ'] = @save_tz
+ else
+ ENV.delete('TZ')
+ end
end
def test_directory?
@@ -46,4 +50,4 @@ def test_longname_for_file_should_format_as_file
assert_equal "-rwxr-xr-x jamis users 10240 Mar 12 03:40 test",
@file.longname
end
-end
+end

0 comments on commit 2cb3e63

Please sign in to comment.