Rails 2.3.1

Update to the release version of Rails 2.3.1.
This commit is contained in:
Jacques Distler 2009-03-05 07:54:17 -06:00
parent bd9fa0ed0c
commit 5e7d2cf973
25 changed files with 199 additions and 26 deletions

View file

@ -2237,6 +2237,22 @@ class RouteSetTest < Test::Unit::TestCase
)
end
def test_format_is_not_inherit
set.draw do |map|
map.connect '/posts.:format', :controller => 'posts'
end
assert_equal '/posts', set.generate(
{:controller => 'posts'},
{:controller => 'posts', :action => 'index', :format => 'xml'}
)
assert_equal '/posts.xml', set.generate(
{:controller => 'posts', :format => 'xml'},
{:controller => 'posts', :action => 'index', :format => 'xml'}
)
end
def test_expiry_determination_should_consider_values_with_to_param
set.draw { |map| map.connect 'projects/:project_id/:controller/:action' }
assert_equal '/projects/1/post/show', set.generate(