Repository navigation
-
Allow real requests except to destinations listed in
disallow:(#1058)WebMock.allow_net_connect!(disallow: ["billing.example.com"])lets tests reach other hosts. When WebMock intercepts a request to the billing host, it raisesWebMock::NetConnectNotAllowedErrorunless a stub matches.disallow:accepts the same matchers asallow:.Thanks to sandfortw for the suggestion
-
Fix
RequestStub#thensilently ignoring its block (#1037)Previously,
stub.then { |s| s.with(query: {page: "1"}) }ignored the block. The stub now requirespage=1, so a request without it no longer matches. With a block,thenreturns the block's result. Without a block, it still chains responses as before. -
Fix Excon splitting stubbed chunks when
Transfer-Encodingis["gzip", "chunked"]WebMock now keeps transfer encodings in the order you specify. With
body_chunks: ["ab", "cd"]and Excon'schunk_size: 1, the streaming callback now receives"ab"and"cd". Previously it received four single bytes.