mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-08-13 00:02:57 -04:00
Compare commits
4 Commits
a3add3c721
...
ab3bc3ea18
Author | SHA1 | Date | |
---|---|---|---|
|
ab3bc3ea18 | ||
|
62a241b22e | ||
|
8db1557827 | ||
|
5108a6247f |
@ -204,6 +204,16 @@ class WebmockTest < Minitest::Test
|
||||
WebMock.disable_net_connect!
|
||||
end
|
||||
|
||||
def test_webmock_disable_after_enable
|
||||
WebMock.disable!
|
||||
|
||||
# WebMock is disabled so this will make a real http request
|
||||
http_request(:get, "http://#{httpbin}")
|
||||
|
||||
# WebMock is disabled so it should not have registered the request
|
||||
assert_not_requested(:get, "http://#{httpbin}")
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def assert_raise_with_message(e, message, &block)
|
||||
|
@ -122,7 +122,7 @@ module WebMock
|
||||
|
||||
class << self
|
||||
def enable!
|
||||
@original_session = HTTPX::Session
|
||||
@original_session ||= HTTPX::Session
|
||||
|
||||
webmock_session = HTTPX.plugin(Plugin)
|
||||
|
||||
|
@ -16,8 +16,10 @@ if [[ "$RUBY_ENGINE" = "truffleruby" ]]; then
|
||||
elif [[ "$RUBY_PLATFORM" = "java" ]]; then
|
||||
apt-get update && apt-get install -y build-essential iptables iproute2 file idn2 git
|
||||
elif [[ ${RUBY_VERSION:0:3} = "2.3" ]]; then
|
||||
# installing custom openssl
|
||||
echo "deb http://archive.debian.org/debian stretch main contrib non-free" > /etc/apt/sources.list
|
||||
apt-get update && apt-get install -y iptables iproute2 iptables-nftables-compat libmagic-dev shared-mime-info # openssl=1.0.2l openssl-dev=1.0.2l
|
||||
IPTABLES=iptables
|
||||
# installing custom openssl
|
||||
wget http://deb.debian.org/debian/pool/main/o/openssl1.0/libssl1.0.2_1.0.2u-1~deb9u1_amd64.deb
|
||||
dpkg -i libssl1.0.2_1.0.2u-1~deb9u1_amd64.deb
|
||||
wget http://deb.debian.org/debian/pool/main/o/openssl1.0/libssl1.0-dev_1.0.2u-1~deb9u1_amd64.deb
|
||||
|
Loading…
x
Reference in New Issue
Block a user