spec/shell_spec.rb in igp-1.0.0 vs spec/shell_spec.rb in igp-1.1.0

- old
+ new

@@ -115,46 +115,45 @@ expect(@shell.options[:host]).to eql(@host) expect(@shell.options[:port]).to eql(@port) end end - # TODO: LDAP was retired from net-ping. to add back in one way or another - # describe 'ldap configuration' do - # before(:each) do - # @type = :ldap - # @host = 'localhost' - # @port = 389 - # @options_server_value = "#{@type}://#{@host}" - # @shell = Igp::Shell.new(GetOptions.new(Igp::Shell::OPTIONS, []), [@options_server_value]) - # end - # it 'should support url accessor' do - # expect(@shell.options[:url]).to eql(@options_server_value) - # end - # it 'should default to tcp ping with url when given server with tcp protocol setting' do - # expect(@shell.options[:type]).to eql(@type) - # end - # it 'should resolve host/port' do - # expect(@shell.options[:host]).to eql(@host) - # expect(@shell.options[:port]).to eql(@port) - # end - # end + describe 'ldap configuration' do + before(:each) do + @type = :ldap + @host = 'localhost' + @port = 389 + @options_server_value = "#{@type}://#{@host}" + @shell = Igp::Shell.new(GetOptions.new(Igp::Shell::OPTIONS, []), [@options_server_value]) + end + it 'should support url accessor' do + expect(@shell.options[:url]).to eql(@options_server_value) + end + it 'should default to tcp ping with url when given server with tcp protocol setting' do + expect(@shell.options[:type]).to eql(@type) + end + it 'should resolve host/port' do + expect(@shell.options[:host]).to eql(@host) + expect(@shell.options[:port]).to eql(@port) + end + end - # describe 'ldaps configuration' do - # before(:each) do - # @type = :ldaps - # @host = 'localhost' - # @port = 636 - # @options_server_value = "#{@type}://#{@host}" - # @shell = Igp::Shell.new(GetOptions.new(Igp::Shell::OPTIONS, []), [@options_server_value]) - # end - # it 'should support url accessor' do - # expect(@shell.options[:url]).to eql(@options_server_value) - # end - # it 'should default to tcp ping with url when given server with tcp protocol setting' do - # expect(@shell.options[:type]).to eql(@type) - # end - # it 'should resolve host/port' do - # expect(@shell.options[:host]).to eql(@host) - # expect(@shell.options[:port]).to eql(@port) - # end - # end + describe 'ldaps configuration' do + before(:each) do + @type = :ldaps + @host = 'localhost' + @port = 636 + @options_server_value = "#{@type}://#{@host}" + @shell = Igp::Shell.new(GetOptions.new(Igp::Shell::OPTIONS, []), [@options_server_value]) + end + it 'should support url accessor' do + expect(@shell.options[:url]).to eql(@options_server_value) + end + it 'should default to tcp ping with url when given server with tcp protocol setting' do + expect(@shell.options[:type]).to eql(@type) + end + it 'should resolve host/port' do + expect(@shell.options[:host]).to eql(@host) + expect(@shell.options[:port]).to eql(@port) + end + end end