FakeWeb is a helper for faking web requests in Ruby. It works at a global level, without modifying code or writing extensive stubs.
FakeWeb is a helper for faking web requests in ruby. It works at a global level, without modifying code or writing extensive stubs.
FakeWeb lets you decouple your test environment from live services without modifying code or writing extensive stubs. In addition to the conceptual advantage of having idempotent request behaviour, FakeWeb makes tests run faster than if they were made to remote (or even local) web servers. It also makes it possible to run tests without a network connection or in situations where the server is behind a firewall or has host-based access controls.
FakeWeb works with anything based on Net::HTTP
–both higher-level wrappers, like OpenURI
, as well as a ton of libraries for popular web services.
You should be using this tag if the question is related to the use of FakeWeb or its APIs.