File: test-actually-mock.patch

package info (click to toggle)
ruby-net-ldap 0.12.1-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 616 kB
  • ctags: 551
  • sloc: ruby: 4,064; sh: 117; makefile: 4
file content (12 lines) | stat: -rw-r--r-- 511 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
Index: ruby-net-ldap/test/test_ldap_connection.rb
===================================================================
--- ruby-net-ldap.orig/test/test_ldap_connection.rb
+++ ruby-net-ldap/test/test_ldap_connection.rb
@@ -61,6 +61,7 @@ class TestLDAPConnection < Test::Unit::T
   end
 
   def test_unresponsive_host
+    flexmock(TCPSocket).should_receive(:new).and_raise(Errno::ETIMEDOUT)
     assert_raise Net::LDAP::Error do
       Net::LDAP::Connection.new(:host => 'test.mocked.com', :port => 636)
     end