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

joebadmo-rack-test

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

joebadmo-rack-test

  • 0.6.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

= Rack::Test {}[https://codeclimate.com/github/brynary/rack-test]

== Description

Rack::Test is a small, simple testing API for Rack apps. It can be used on its own or as a reusable starting point for Web frameworks and testing libraries to build on. Most of its initial functionality is an extraction of Merb 1.0's request helpers feature.

== Features

  • Maintains a cookie jar across requests
  • Easily follow redirects when desired
  • Set request headers to be used by all subsequent requests
  • Small footprint. Approximately 200 LOC

== Example

require "rack/test"

class HomepageTest < Test::Unit::TestCase include Rack::Test::Methods

def app
  MyApp.new
end

def test_redirect_logged_in_users_to_dashboard
  authorize "bryan", "secret"
  get "/"
  follow_redirect!

  assert_equal "http://example.org/redirected", last_request.url
  assert last_response.ok?
end

end

== Install

To install the latest release as a gem:

sudo gem install rack-test

Or via Bundler:

gem "rack-test", require: "rack/test"

== Authors

  • Maintained by {Bryan Helmkamp}[mailto:bryan@brynary.com]
  • Contributions from Simon Rozet and Pat Nakajima
  • Much of the original code was extracted from Merb 1.0's request helper

== License

Copyright (c) 2008-2009 Bryan Helmkamp, Engine Yard Inc. See MIT-LICENSE.txt in this directory.

FAQs

Package last updated on 22 Sep 2012

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