33class TestLDAPConnection < Test ::Unit ::TestCase
44 def test_unresponsive_host
55 assert_raise Net ::LDAP ::LdapError do
6- Net ::LDAP ::Connection . new ( :server => 'test.mocked.com' , :port => 636 )
6+ Net ::LDAP ::Connection . new ( :host => 'test.mocked.com' , :port => 636 )
77 end
88 end
99
1010 def test_blocked_port
1111 flexmock ( TCPSocket ) . should_receive ( :new ) . and_raise ( SocketError )
1212 assert_raise Net ::LDAP ::LdapError do
13- Net ::LDAP ::Connection . new ( :server => 'test.mocked.com' , :port => 636 )
13+ Net ::LDAP ::Connection . new ( :host => 'test.mocked.com' , :port => 636 )
1414 end
1515 end
1616
1717 def test_raises_unknown_exceptions
1818 error = Class . new ( StandardError )
1919 flexmock ( TCPSocket ) . should_receive ( :new ) . and_raise ( error )
2020 assert_raise error do
21- Net ::LDAP ::Connection . new ( :server => 'test.mocked.com' , :port => 636 )
21+ Net ::LDAP ::Connection . new ( :host => 'test.mocked.com' , :port => 636 )
2222 end
2323 end
2424
@@ -50,7 +50,7 @@ def setup
5050 @tcp_socket = flexmock ( :connection )
5151 @tcp_socket . should_receive ( :write )
5252 flexmock ( TCPSocket ) . should_receive ( :new ) . and_return ( @tcp_socket )
53- @connection = Net ::LDAP ::Connection . new ( :server => 'test.mocked.com' , :port => 636 )
53+ @connection = Net ::LDAP ::Connection . new ( :host => 'test.mocked.com' , :port => 636 )
5454 end
5555
5656 def test_error_failed_operation
@@ -74,15 +74,15 @@ def test_no_error_on_success
7474 end
7575end
7676
77- class TestLDAPInstrumentation < Test ::Unit ::TestCase
77+ class TestLDAPConnectionInstrumentation < Test ::Unit ::TestCase
7878 def setup
7979 @tcp_socket = flexmock ( :connection )
8080 @tcp_socket . should_receive ( :write )
8181 flexmock ( TCPSocket ) . should_receive ( :new ) . and_return ( @tcp_socket )
8282
8383 @service = MockInstrumentationService . new
8484 @connection = Net ::LDAP ::Connection . new \
85- :server => 'test.mocked.com' ,
85+ :host => 'test.mocked.com' ,
8686 :port => 636 ,
8787 :instrumentation_service => @service
8888 end
0 commit comments