diff options
author | Kane Morgan <kane.a.s.morgan@gmail.com> | 2016-05-15 22:10:25 +0100 |
---|---|---|
committer | Kane Morgan <kane.a.s.morgan@gmail.com> | 2016-05-15 22:10:25 +0100 |
commit | bfcc0fdbacd2f049b718bb8f204d07fb85520c43 (patch) | |
tree | b9aac63146e672524de8e3428e45435dda8b8254 /test/start | |
parent | 74d7da59546748882641975933b7367e82890792 (diff) | |
download | net-ssh-bfcc0fdbacd2f049b718bb8f204d07fb85520c43.tar.gz |
set default options before checking for nils
Diffstat (limited to 'test/start')
-rw-r--r-- | test/start/test_options.rb | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/test/start/test_options.rb b/test/start/test_options.rb index ce911b5..fbce198 100644 --- a/test/start/test_options.rb +++ b/test/start/test_options.rb @@ -55,17 +55,24 @@ module NetSSH def test_constructor_should_reject_options_set_to_nil assert_raises(ArgumentError) do - options = { :remote_user => nil} + options = { :remote_user => nil } Net::SSH.start('localhost', 'testuser', options) end end def test_constructor_should_reject_invalid_options assert_raises(ArgumentError) do - options = { :some_invalid_option => "some setting"} + options = { :some_invalid_option => "some setting" } Net::SSH.start('localhost', 'testuser', options) end end + + def test_constructor_should_set_default_options + options = { :logger => nil, :password_prompt => nil } + Net::SSH.start('localhost', 'testuser', options) + assert !options[:logger].nil? + assert !options[:password_prompt].nil? + end end end |