summaryrefslogtreecommitdiff
path: root/spec/unit/knife/ssl_check_spec.rb
diff options
context:
space:
mode:
authortyler-ball <tyleraball@gmail.com>2015-12-03 13:50:29 -0700
committertyler-ball <tyleraball@gmail.com>2015-12-09 14:23:53 -0700
commit200c3e5b71ec269efffbfb97e94f1a7aada951af (patch)
tree3eabfe9d693eb83cafa42cd43260bf962e99f10c /spec/unit/knife/ssl_check_spec.rb
parent010392858c2a3a036578b681085704ed1971ab21 (diff)
downloadchef-200c3e5b71ec269efffbfb97e94f1a7aada951af.tar.gz
Adding proxifier dependency and leveraging its ability to make TCPSocket.new respect ENV['http_proxy']
Diffstat (limited to 'spec/unit/knife/ssl_check_spec.rb')
-rw-r--r--spec/unit/knife/ssl_check_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/unit/knife/ssl_check_spec.rb b/spec/unit/knife/ssl_check_spec.rb
index a9d1145f34..feeb85c8af 100644
--- a/spec/unit/knife/ssl_check_spec.rb
+++ b/spec/unit/knife/ssl_check_spec.rb
@@ -145,7 +145,7 @@ E
let(:ssl_socket) { double(OpenSSL::SSL::SSLSocket) }
before do
- expect(TCPSocket).to receive(:new).with("foo.example.com", 8443).and_return(tcp_socket)
+ expect(ssl_check).to receive(:proxified_socket).with("foo.example.com", 8443).and_return(tcp_socket)
expect(OpenSSL::SSL::SSLSocket).to receive(:new).with(tcp_socket, ssl_check.verify_peer_ssl_context).and_return(ssl_socket)
end
@@ -183,7 +183,7 @@ E
before do
@old_signal = trap(:INT, "DEFAULT")
- expect(TCPSocket).to receive(:new).
+ expect(ssl_check).to receive(:proxified_socket).
with("foo.example.com", 8443).
and_return(tcp_socket_for_debug)
expect(OpenSSL::SSL::SSLSocket).to receive(:new).