Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fakeweb-matcher

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fakeweb-matcher

  • 1.2.4
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

h1. FakeWeb Matcher

An RSpec matcher for the Fakeweb HTTP stubbing library, allowing you to use RSpec syntax to check if requests to particular URIs have been made.

h2. Installing

First, install the gem

gem install fakeweb-matcher --source http://gemcutter.org

Then, in your @spec/spec_helper.rb@ file, you'll need to require the library after you have required "FakeWeb":http://fakeweb.rubyforge.org and "RSpec":http://rspec.info. It should end up looking something like this:

require 'spec'
require 'fakeweb'
require 'fakeweb_matcher'

This ensures that the matcher is automatically loaded into RSpec for you.

h2. Usage

FakeWeb.should have_requested(:get, 'http://example.com')
FakeWeb.should have_requested(:any, 'http://example.com')
FakeWeb.should have_requested(:post, /http:\/\/example.com\/)
FakeWeb.should_not have_requested(:put, 'http://example.com')

h2. Contribution

Unsurprisingly, this library is tested using RSpec, and relies upon FakeWeb. It also uses "YARD":http://yard.soen.ca/ for documentation, so if you're submitting patches (which are most definitely welcome!) please use YARD syntax and have valid specs.

h2. Contributors

h2. Copyright

Copyright (c) 2009 Pat Allan, released under an MIT Licence

FAQs

Package last updated on 12 Apr 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc