|
3 | 3 | class TestLDAPConnection < Test::Unit::TestCase |
4 | 4 | def test_unresponsive_host |
5 | 5 | 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) |
7 | 7 | end |
8 | 8 | end |
9 | 9 |
|
10 | 10 | def test_blocked_port |
11 | 11 | flexmock(TCPSocket).should_receive(:new).and_raise(SocketError) |
12 | 12 | 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) |
14 | 14 | end |
15 | 15 | end |
16 | 16 |
|
17 | 17 | def test_raises_unknown_exceptions |
18 | 18 | error = Class.new(StandardError) |
19 | 19 | flexmock(TCPSocket).should_receive(:new).and_raise(error) |
20 | 20 | 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) |
22 | 22 | end |
23 | 23 | end |
24 | 24 |
|
@@ -50,7 +50,7 @@ def setup |
50 | 50 | @tcp_socket = flexmock(:connection) |
51 | 51 | @tcp_socket.should_receive(:write) |
52 | 52 | 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) |
54 | 54 | end |
55 | 55 |
|
56 | 56 | def test_error_failed_operation |
@@ -82,7 +82,7 @@ def setup |
82 | 82 |
|
83 | 83 | @service = MockInstrumentationService.new |
84 | 84 | @connection = Net::LDAP::Connection.new \ |
85 | | - :server => 'test.mocked.com', |
| 85 | + :host => 'test.mocked.com', |
86 | 86 | :port => 636, |
87 | 87 | :instrumentation_service => @service |
88 | 88 | end |
|
0 commit comments