Sha256: 0da94e2b408c2735c0198466fa72b3abfdf31586e47730020183fa6a3581932c

Contents?: true

Size: 1.32 KB

Versions: 118

Compression:

Stored size: 1.32 KB

Contents

= Rack::Test

- Code: http://github.com/brynary/rack-test
- Build: http://runcoderun.com/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

== 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.

Version data entries

118 entries across 109 versions & 11 rubygems

Version Path
classiccms-0.7.5 vendor/bundle/gems/rack-test-0.6.1/README.rdoc
classiccms-0.7.4 vendor/bundle/gems/rack-test-0.6.1/README.rdoc
classiccms-0.7.3 vendor/bundle/gems/rack-test-0.6.1/README.rdoc
mango-0.7.1 vendor/bundler/ruby/2.0.0/gems/rack-test-0.6.0/README.rdoc
mango-0.7.0 vendor/bundler/ruby/2.0.0/gems/rack-test-0.6.0/README.rdoc
classiccms-0.7.2 vendor/bundle/gems/rack-test-0.6.1/README.rdoc
classiccms-0.7.1 vendor/bundle/gems/rack-test-0.6.1/README.rdoc
classiccms-0.7.0 vendor/bundle/gems/rack-test-0.6.1/README.rdoc
classiccms-0.6.9 vendor/bundle/gems/rack-test-0.6.1/README.rdoc
challah-rolls-0.2.0 vendor/bundle/gems/challah-0.8.3/vendor/bundle/gems/rack-test-0.6.1/README.rdoc
challah-rolls-0.2.0 vendor/bundle/gems/rack-test-0.6.1/README.rdoc
challah-rolls-0.2.0 vendor/bundle/gems/challah-0.8.0.pre/vendor/bundle/gems/rack-test-0.6.1/README.rdoc
challah-0.8.3 vendor/bundle/gems/rack-test-0.6.1/README.rdoc
classiccms-0.6.8 vendor/bundle/gems/rack-test-0.6.1/README.rdoc
classiccms-0.6.7 vendor/bundle/gems/rack-test-0.6.1/README.rdoc
classiccms-0.6.6 vendor/bundle/gems/rack-test-0.6.1/README.rdoc
classiccms-0.6.5 vendor/bundle/gems/rack-test-0.6.1/README.rdoc
classiccms-0.6.4 vendor/bundle/gems/rack-test-0.6.1/README.rdoc
classiccms-0.6.3 vendor/bundle/gems/rack-test-0.6.1/README.rdoc
classiccms-0.6.2 vendor/bundle/gems/rack-test-0.6.1/README.rdoc