diff --git a/test/test_protocol.rb b/test/test_protocol.rb index 8d246bd..0144c66 100644 --- a/test/test_protocol.rb +++ b/test/test_protocol.rb @@ -1,7 +1,7 @@ require 'common' class ProtocolTest < Net::SFTP::TestCase - 1.upto(6) do |version| + 1.upto(5) do |version| define_method("test_load_version_#{version}_should_return_v#{version}_driver") do session = stub('session', :logger => nil) driver = Net::SFTP::Protocol.load(session, version) @@ -9,9 +9,15 @@ class ProtocolTest < Net::SFTP::TestCase end end + def test_load_version_6_should_return_v6_driver + session = stub('session', :logger => nil) + driver = Net::SFTP::Protocol.load(session, 6) + assert_instance_of Net::SFTP::Protocol.const_get("V06")::Extended, driver + end + def test_load_version_7_should_be_unsupported assert_raises(NotImplementedError) do Net::SFTP::Protocol.load(stub('session'), 7) end end -end \ No newline at end of file +end