spec/tcr_spec.rb in tcr-0.4.0 vs spec/tcr_spec.rb in tcr-0.4.1
- old
+ new
@@ -521,6 +521,20 @@
break
end
end
}.not_to raise_error
end
+
+ context "when port is not in hook_tcp_ports" do
+ it "it honors Socket.tcp keyword arguments" do
+ TCR.configure { |c|
+ c.hook_tcp_ports = [8080]
+ c.cassette_library_dir = "."
+ }
+
+ TCR.use_cassette("test") do
+ sock = Socket.tcp("google.com", 80, connect_timeout: 1, resolv_timeout: 1)
+ expect(sock).to be_a(Socket)
+ end
+ end
+ end
end