From ad693adc688d9c6075c10af48362f330c46d94c8 Mon Sep 17 00:00:00 2001 From: Ari Lerner Date: Thu, 18 Dec 2008 23:40:40 -0800 Subject: Removed commented lines from old code, fixed two failing specs, ALL SPECS PASS NOW --- test/authentication/test_key_manager.rb | 3 ++- test/common.rb | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/authentication/test_key_manager.rb b/test/authentication/test_key_manager.rb index a670406..f68bcfd 100644 --- a/test/authentication/test_key_manager.rb +++ b/test/authentication/test_key_manager.rb @@ -38,7 +38,7 @@ module Authentication assert_equal 2, identities.length assert_equal rsa.to_blob, identities.first.to_blob assert_equal dsa.to_blob, identities.last.to_blob - + assert_equal({:from => :file, :file => "/first"}, manager.known_identities[rsa]) assert_equal({:from => :file, :file => "/second"}, manager.known_identities[dsa]) end @@ -77,6 +77,7 @@ module Authentication File.expects(:readable?).returns(true) # Net::SSH::KeyFactory.expects(:load_public_key).with("#{name}").returns(key) Net::SSH::KeyFactory.expects(:load_private_key).with(name, nil).returns(key).at_least_once + key.expects(:public_key).returns(key) end def rsa(size=32) diff --git a/test/common.rb b/test/common.rb index 566725d..0af855c 100644 --- a/test/common.rb +++ b/test/common.rb @@ -7,7 +7,6 @@ require 'net/ssh/loggable' require 'net/ssh/packet' require 'net/ssh/transport/session' require 'ostruct' -require 'rubygems' # clear the default files out so that tests don't get confused by existing # SSH config files. -- cgit v1.2.1