views:

253

answers:

2

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.

A: 

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.

chrisk
+1  A: 

You can use WebMock http://github.com/bblimke/webmock. It has support for Httpclient.

Bartosz Blimke
And you can consider using [VCR](http://github.com/myronmarston/vcr) in conjunction with WebMock.
Myron