Rails 2.3.3.1

Update to latest Rails.
A little bit of jiggery-pokery is involved, since they
neglected to re-include vendored Rack in this release.
This commit is contained in:
Jacques Distler 2009-08-04 10:16:03 -05:00
parent 329fafafce
commit 664552ac02
257 changed files with 4346 additions and 1682 deletions

View file

@ -1662,6 +1662,17 @@ class RouteSetTest < Test::Unit::TestCase
assert_equal 1, set.routes.size
end
def test_draw_symbol_controller_name
assert_equal 0, set.routes.size
set.draw do |map|
map.connect '/users/index', :controller => :users, :action => :index
end
@request = ActionController::TestRequest.new
@request.request_uri = '/users/index'
assert_nothing_raised { set.recognize(@request) }
assert_equal 1, set.routes.size
end
def test_named_draw
assert_equal 0, set.routes.size
set.draw do |map|
@ -2476,6 +2487,16 @@ class RouteSetTest < Test::Unit::TestCase
end
assert_equal({:controller => 'pages', :action => 'show', :name => 'JAMIS'}, set.recognize_path('/page/JAMIS'))
end
def test_routes_with_symbols
set.draw do |map|
map.connect 'unnamed', :controller => :pages, :action => :show, :name => :as_symbol
map.named 'named', :controller => :pages, :action => :show, :name => :as_symbol
end
assert_equal({:controller => 'pages', :action => 'show', :name => :as_symbol}, set.recognize_path('/unnamed'))
assert_equal({:controller => 'pages', :action => 'show', :name => :as_symbol}, set.recognize_path('/named'))
end
end
class RouteLoadingTest < Test::Unit::TestCase