@@ -11,21 +11,21 @@ def capture_stderr
11
11
12
12
def test_list_of_hosts_with_first_host_successful
13
13
hosts = [
14
- [ 'test.mocked.com' , 636 ] ,
15
- [ 'test2.mocked.com' , 636 ] ,
16
- [ 'test3.mocked.com' , 636 ] ,
17
- ]
14
+ [ 'test.mocked.com' , 636 ] ,
15
+ [ 'test2.mocked.com' , 636 ] ,
16
+ [ 'test3.mocked.com' , 636 ] ,
17
+ ]
18
18
flexmock ( TCPSocket ) . should_receive ( :new ) . ordered . with ( *hosts [ 0 ] ) . once . and_return ( nil )
19
19
flexmock ( TCPSocket ) . should_receive ( :new ) . ordered . never
20
20
Net ::LDAP ::Connection . new ( :hosts => hosts )
21
21
end
22
22
23
23
def test_list_of_hosts_with_first_host_failure
24
24
hosts = [
25
- [ 'test.mocked.com' , 636 ] ,
26
- [ 'test2.mocked.com' , 636 ] ,
27
- [ 'test3.mocked.com' , 636 ] ,
28
- ]
25
+ [ 'test.mocked.com' , 636 ] ,
26
+ [ 'test2.mocked.com' , 636 ] ,
27
+ [ 'test3.mocked.com' , 636 ] ,
28
+ ]
29
29
flexmock ( TCPSocket ) . should_receive ( :new ) . ordered . with ( *hosts [ 0 ] ) . once . and_raise ( SocketError )
30
30
flexmock ( TCPSocket ) . should_receive ( :new ) . ordered . with ( *hosts [ 1 ] ) . once . and_return ( nil )
31
31
flexmock ( TCPSocket ) . should_receive ( :new ) . ordered . never
@@ -34,10 +34,10 @@ def test_list_of_hosts_with_first_host_failure
34
34
35
35
def test_list_of_hosts_with_all_hosts_failure
36
36
hosts = [
37
- [ 'test.mocked.com' , 636 ] ,
38
- [ 'test2.mocked.com' , 636 ] ,
39
- [ 'test3.mocked.com' , 636 ] ,
40
- ]
37
+ [ 'test.mocked.com' , 636 ] ,
38
+ [ 'test2.mocked.com' , 636 ] ,
39
+ [ 'test3.mocked.com' , 636 ] ,
40
+ ]
41
41
flexmock ( TCPSocket ) . should_receive ( :new ) . ordered . with ( *hosts [ 0 ] ) . once . and_raise ( SocketError )
42
42
flexmock ( TCPSocket ) . should_receive ( :new ) . ordered . with ( *hosts [ 1 ] ) . once . and_raise ( SocketError )
43
43
flexmock ( TCPSocket ) . should_receive ( :new ) . ordered . with ( *hosts [ 2 ] ) . once . and_raise ( SocketError )
0 commit comments