@@ -124,7 +124,7 @@ def test_modify_ops_add
124124 end
125125
126126 def test_modify_ops_replace
127- args = { :operations => [ [ :replace , "mail" , "[email protected] " ] ] } 127+ args = { :operations => [ [ :replace , "mail" , "[email protected] " ] ] } 128128 result = Net ::LDAP ::Connection . modify_ops ( args [ :operations ] )
129129 expected = [ "0#\n \x01 \x02 0\x1E \x04 \x04 mail1\x16 \x04 \x14 [email protected] " ] 130130 assert_equal ( expected , result )
@@ -191,9 +191,9 @@ def test_queued_read_reads_until_message_id_match
191191 result2 = make_message ( 2 )
192192
193193 mock = flexmock ( "socket" )
194- mock . should_receive ( :read_ber ) .
195- and_return ( result1 ) .
196- and_return ( result2 )
194+ mock . should_receive ( :read_ber )
195+ . and_return ( result1 )
196+ . and_return ( result2 )
197197 conn = Net ::LDAP ::Connection . new ( :socket => mock )
198198
199199 assert result = conn . queued_read ( 2 )
@@ -206,9 +206,9 @@ def test_queued_read_modify
206206 result2 = make_message ( 2 , app_tag : Net ::LDAP ::PDU ::ModifyResponse )
207207
208208 mock = flexmock ( "socket" )
209- mock . should_receive ( :read_ber ) .
210- and_return ( result1 ) .
211- and_return ( result2 )
209+ mock . should_receive ( :read_ber )
210+ . and_return ( result1 )
211+ . and_return ( result2 )
212212 mock . should_receive ( :write )
213213 conn = Net ::LDAP ::Connection . new ( :socket => mock )
214214
@@ -227,9 +227,9 @@ def test_queued_read_add
227227 result2 = make_message ( 2 , app_tag : Net ::LDAP ::PDU ::AddResponse )
228228
229229 mock = flexmock ( "socket" )
230- mock . should_receive ( :read_ber ) .
231- and_return ( result1 ) .
232- and_return ( result2 )
230+ mock . should_receive ( :read_ber )
231+ . and_return ( result1 )
232+ . and_return ( result2 )
233233 mock . should_receive ( :write )
234234 conn = Net ::LDAP ::Connection . new ( :socket => mock )
235235
@@ -245,9 +245,9 @@ def test_queued_read_rename
245245 result2 = make_message ( 2 , app_tag : Net ::LDAP ::PDU ::ModifyRDNResponse )
246246
247247 mock = flexmock ( "socket" )
248- mock . should_receive ( :read_ber ) .
249- and_return ( result1 ) .
250- and_return ( result2 )
248+ mock . should_receive ( :read_ber )
249+ . and_return ( result1 )
250+ . and_return ( result2 )
251251 mock . should_receive ( :write )
252252 conn = Net ::LDAP ::Connection . new ( :socket => mock )
253253
@@ -266,9 +266,9 @@ def test_queued_read_delete
266266 result2 = make_message ( 2 , app_tag : Net ::LDAP ::PDU ::DeleteResponse )
267267
268268 mock = flexmock ( "socket" )
269- mock . should_receive ( :read_ber ) .
270- and_return ( result1 ) .
271- and_return ( result2 )
269+ mock . should_receive ( :read_ber )
270+ . and_return ( result1 )
271+ . and_return ( result2 )
272272 mock . should_receive ( :write )
273273 conn = Net ::LDAP ::Connection . new ( :socket => mock )
274274
@@ -284,13 +284,13 @@ def test_queued_read_setup_encryption_with_start_tls
284284 result2 = make_message ( 2 , app_tag : Net ::LDAP ::PDU ::ExtendedResponse )
285285
286286 mock = flexmock ( "socket" )
287- mock . should_receive ( :read_ber ) .
288- and_return ( result1 ) .
289- and_return ( result2 )
287+ mock . should_receive ( :read_ber )
288+ . and_return ( result1 )
289+ . and_return ( result2 )
290290 mock . should_receive ( :write )
291291 conn = Net ::LDAP ::Connection . new ( :socket => mock )
292- flexmock ( Net ::LDAP ::Connection ) . should_receive ( :wrap_with_ssl ) . with ( mock , { } , nil ) .
293- and_return ( mock )
292+ flexmock ( Net ::LDAP ::Connection ) . should_receive ( :wrap_with_ssl ) . with ( mock , { } , nil )
293+ . and_return ( mock )
294294
295295 conn . next_msgid # simulates ongoing query
296296
@@ -303,9 +303,9 @@ def test_queued_read_bind_simple
303303 result2 = make_message ( 2 , app_tag : Net ::LDAP ::PDU ::BindResult )
304304
305305 mock = flexmock ( "socket" )
306- mock . should_receive ( :read_ber ) .
307- and_return ( result1 ) .
308- and_return ( result2 )
306+ mock . should_receive ( :read_ber )
307+ . and_return ( result1 )
308+ . and_return ( result2 )
309309 mock . should_receive ( :write )
310310 conn = Net ::LDAP ::Connection . new ( :socket => mock )
311311
@@ -314,7 +314,8 @@ def test_queued_read_bind_simple
314314 assert result = conn . bind (
315315 method : :simple ,
316316 username : "uid=user1,ou=People,dc=rubyldap,dc=com" ,
317- password : "passworD1" )
317+ password : "passworD1" ,
318+ )
318319 assert result . success?
319320 assert_equal 2 , result . message_id
320321 end
@@ -324,9 +325,9 @@ def test_queued_read_bind_sasl
324325 result2 = make_message ( 2 , app_tag : Net ::LDAP ::PDU ::BindResult )
325326
326327 mock = flexmock ( "socket" )
327- mock . should_receive ( :read_ber ) .
328- and_return ( result1 ) .
329- and_return ( result2 )
328+ mock . should_receive ( :read_ber )
329+ . and_return ( result1 )
330+ . and_return ( result2 )
330331 mock . should_receive ( :write )
331332 conn = Net ::LDAP ::Connection . new ( :socket => mock )
332333
@@ -336,7 +337,8 @@ def test_queued_read_bind_sasl
336337 method : :sasl ,
337338 mechanism : "fake" ,
338339 initial_credential : "passworD1" ,
339- challenge_response : flexmock ( "challenge proc" ) )
340+ challenge_response : flexmock ( "challenge proc" ) ,
341+ )
340342 assert result . success?
341343 assert_equal 2 , result . message_id
342344 end
@@ -481,8 +483,8 @@ def test_search_net_ldap_connection_event
481483 search_result_ber = Net ::BER ::BerIdentifiedArray . new ( [ Net ::LDAP ::ResultCodeSuccess , "" , "" ] )
482484 search_result_ber . ber_identifier = Net ::LDAP ::PDU ::SearchResult
483485 search_result = [ 1 , search_result_ber ]
484- @tcp_socket . should_receive ( :read_ber ) . and_return ( search_data ) .
485- and_return ( search_result )
486+ @tcp_socket . should_receive ( :read_ber ) . and_return ( search_data )
487+ . and_return ( search_result )
486488
487489 events = @service . subscribe "search.net_ldap_connection"
488490 unread = @service . subscribe "search_messages_unread.net_ldap_connection"
0 commit comments