Skip to content

Commit c0db1d1

Browse files
author
Jeremy Bopp
committed
Remove enumerable enforcement attempt in tests
1 parent cede61d commit c0db1d1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/test_ldap_connection.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def test_list_of_hosts_with_first_host_successful
1717
]
1818
flexmock(TCPSocket).should_receive(:new).ordered.with(*hosts[0]).once.and_return(nil)
1919
flexmock(TCPSocket).should_receive(:new).ordered.never
20-
Net::LDAP::Connection.new(:hosts => hosts.to_enum(:each))
20+
Net::LDAP::Connection.new(:hosts => hosts)
2121
end
2222

2323
def test_list_of_hosts_with_first_host_failure
@@ -29,7 +29,7 @@ def test_list_of_hosts_with_first_host_failure
2929
flexmock(TCPSocket).should_receive(:new).ordered.with(*hosts[0]).once.and_raise(SocketError)
3030
flexmock(TCPSocket).should_receive(:new).ordered.with(*hosts[1]).once.and_return(nil)
3131
flexmock(TCPSocket).should_receive(:new).ordered.never
32-
Net::LDAP::Connection.new(:hosts => hosts.to_enum(:each))
32+
Net::LDAP::Connection.new(:hosts => hosts)
3333
end
3434

3535
def test_list_of_hosts_with_all_hosts_failure
@@ -43,7 +43,7 @@ def test_list_of_hosts_with_all_hosts_failure
4343
flexmock(TCPSocket).should_receive(:new).ordered.with(*hosts[2]).once.and_raise(SocketError)
4444
flexmock(TCPSocket).should_receive(:new).ordered.never
4545
assert_raise Net::LDAP::Error do
46-
Net::LDAP::Connection.new(:hosts => hosts.to_enum(:each))
46+
Net::LDAP::Connection.new(:hosts => hosts)
4747
end
4848
end
4949

0 commit comments

Comments
 (0)