I'm using the Handsoap gem with Httpclient gem as the driver in a Rails app.
How can 开发者_高级运维I prevent network calls from Handsaop/Httpclient gems in test cases?
FakeWeb doesn't support Httpclient.
You can use WebMock http://github.com/bblimke/webmock. It has support for Httpclient.
You can use the mock driver for Handsoap (Handsoap::Http::Drivers::MockDriver). See in the tests for an example.
That's right, FakeWeb currently only supports libraries based on Net::HTTP.
Here's a ticket about adding HttpClient support, which also references a couple older forks that attempt to do it.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论