Skip to content

jodosha/rack-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Test for Rack

Installation

sudo gem install jodosha-rack-test -s http://gems.github.com

Example

require “rubygems” require “rack” require “rack/test” class LegacyRoutesTest < Rack::Unit::TestCase def setup @app = LegacyRoutes end def test_should_redirect_to_project_page get “/pages/sashimi” assert_redirected_to “/projects/sashimi” end def test_should_return_not_found get “/pages/unknown” assert_response :not_found end end

Copyright

© 2009 Luca Guidi – http://lucaguidi.com, released under the MIT license