@@ -4,26 +4,26 @@ class TestSCP < Net::SCP::TestCase
44 def test_start_without_block_should_return_scp_instance
55 ssh = stub ( 'session' , :logger => nil )
66 Net ::SSH . expects ( :start ) .
7- with ( "remote.host" , "username" , :password => "foo" ) .
7+ with ( "remote.host" , "username" , { :password => "foo" } ) .
88 returns ( ssh )
99
1010 ssh . expects ( :close ) . never
11- scp = Net ::SCP . start ( "remote.host" , "username" , :password => "foo" )
11+ scp = Net ::SCP . start ( "remote.host" , "username" , { :password => "foo" } )
1212 assert_instance_of Net ::SCP , scp
1313 assert_equal ssh , scp . session
1414 end
1515
1616 def test_start_with_block_should_yield_scp_and_close_ssh_session
1717 ssh = stub ( 'session' , :logger => nil )
1818 Net ::SSH . expects ( :start ) .
19- with ( "remote.host" , "username" , :password => "foo" ) .
19+ with ( "remote.host" , "username" , { :password => "foo" } ) .
2020 returns ( ssh )
2121
2222 ssh . expects ( :loop )
2323 ssh . expects ( :close )
2424
2525 yielded = false
26- Net ::SCP . start ( "remote.host" , "username" , :password => "foo" ) do |scp |
26+ Net ::SCP . start ( "remote.host" , "username" , { :password => "foo" } ) do |scp |
2727 yielded = true
2828 assert_instance_of Net ::SCP , scp
2929 assert_equal ssh , scp . session
@@ -34,26 +34,26 @@ def test_start_with_block_should_yield_scp_and_close_ssh_session
3434
3535 def test_self_upload_should_instatiate_scp_and_invoke_synchronous_upload
3636 scp = stub ( 'scp' )
37- scp . expects ( :upload! ) . with ( "/path/to/local" , "/path/to/remote" , :recursive => true )
37+ scp . expects ( :upload! ) . with ( "/path/to/local" , "/path/to/remote" , { :recursive => true } )
3838
3939 Net ::SCP . expects ( :start ) .
40- with ( "remote.host" , "username" , :password => "foo" ) .
40+ with ( "remote.host" , "username" , { :password => "foo" } ) .
4141 yields ( scp )
4242
4343 Net ::SCP . upload! ( "remote.host" , "username" , "/path/to/local" , "/path/to/remote" ,
44- :ssh => { :password => "foo" } , :recursive => true )
44+ { :ssh => { :password => "foo" } , :recursive => true } )
4545 end
4646
4747 def test_self_download_should_instatiate_scp_and_invoke_synchronous_download
4848 scp = stub ( 'scp' )
49- scp . expects ( :download! ) . with ( "/path/to/remote" , "/path/to/local" , :recursive => true ) . returns ( :result )
49+ scp . expects ( :download! ) . with ( "/path/to/remote" , "/path/to/local" , { :recursive => true } ) . returns ( :result )
5050
5151 Net ::SCP . expects ( :start ) .
52- with ( "remote.host" , "username" , :password => "foo" ) .
52+ with ( "remote.host" , "username" , { :password => "foo" } ) .
5353 yields ( scp )
5454
5555 result = Net ::SCP . download! ( "remote.host" , "username" , "/path/to/remote" , "/path/to/local" ,
56- :ssh => { :password => "foo" } , :recursive => true )
56+ { :ssh => { :password => "foo" } , :recursive => true } )
5757
5858 assert_equal :result , result
5959 end
0 commit comments