Registry / testing / fakeweb

fakeweb

JSON →
library1.3.0rbrubygemsunverified

FakeWeb is a helper for faking web requests in Ruby, working at a global level without modifying code or writing extensive stubs.

gem install fakeweb
INSTALL
IMPORT
SIG · FAKEWEB
F
fakeweb
testingrubyv1.3.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

FakeWeb
require 'fakeweb'

Register a fake URI and make a request

require 'fakeweb' FakeWeb.register_uri(:get, 'https://example.com', body: 'Hello') Net::HTTP.get(URI('https://example.com')) # => 'Hello'
Debug
Known issues
gotchaFakeWeb is no longer actively maintained and may not work with newer Ruby versions or HTTP libraries.
fix
Consider using WebMock or VCR as alternatives for stubbing HTTP requests.
affects: >= 1.3.0
Upgrade
Version history
1.3.0latest on RubyGems
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
6
OpenAI (training)
1
Resources
fakeweb — gem install fakeweb · libregistry