Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A simple Rails plugin to delay responses or return specific response codes. (Needs a new name.)
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
rails
tasks
test
MIT-LICENSE
README
Rakefile
VERSION.yml
request_stubber.gemspec

README

== RequestStubber

Allows you to stub a request by either delaying the request time,
returning a specific response code, or a combination of both.

Note that the RequestStubber module is only mixed-in in development mode.

=== Example

Delays the process time of the request, by n seconds.

  class UsersController
    def index
      # ...
    end

    # Any request send to :index will be delayed 2 seconds.
    delay :index, 2
  end

Returns the specified response code.

  class UsersController
    def index
      # ...
    end

    # Any request send to :index will return a 404 response code.
    respond :index, 404
  end

Copyright (c) 2008 Fingertips, Eloy Duran <e.duran@fngtps.com>, released under the MIT license
Something went wrong with that request. Please try again.