Skip to content

Commit

Permalink
Removed commented lines from old code, fixed two failing specs, ALL S…
Browse files Browse the repository at this point in the history
…PECS PASS NOW
  • Loading branch information
Ari Lerner committed Dec 19, 2008
1 parent 1e28343 commit ad693ad
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions lib/net/ssh/authentication/key_manager.rb
Expand Up @@ -89,8 +89,6 @@ def identities
end

key_files.each do |file|
# Faking the public key
# public_key_file = file# + '.pub'
if File.readable?(file)
begin
private_key = KeyFactory.load_private_key(file)
Expand Down
3 changes: 2 additions & 1 deletion test/authentication/test_key_manager.rb
Expand Up @@ -38,7 +38,7 @@ def test_identities_should_load_from_key_files
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
Expand Down Expand Up @@ -77,6 +77,7 @@ def stub_file_key(name, key, also_private=false)
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)
Expand Down
1 change: 0 additions & 1 deletion test/common.rb
Expand Up @@ -7,7 +7,6 @@
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.
Expand Down

0 comments on commit ad693ad

Please sign in to comment.