aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/routing_test.rb
diff options
context:
space:
mode:
authorTobias Lütke <tobias.luetke@gmail.com>2007-09-06 14:28:32 +0000
committerTobias Lütke <tobias.luetke@gmail.com>2007-09-06 14:28:32 +0000
commit68d685056a6a8a6fcb7f922c161d26a54c770213 (patch)
treeafcb67a455a6b9fba6434ae9c0f74cfc74e47433 /actionpack/test/controller/routing_test.rb
parent0e6c8e5f6c168b9d376122f730c604d3758f4b04 (diff)
downloadrails-68d685056a6a8a6fcb7f922c161d26a54c770213.tar.gz
rails-68d685056a6a8a6fcb7f922c161d26a54c770213.tar.bz2
rails-68d685056a6a8a6fcb7f922c161d26a54c770213.zip
Remove deprecated named routes [pixeltrix]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7415 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/controller/routing_test.rb')
-rw-r--r--actionpack/test/controller/routing_test.rb54
1 files changed, 1 insertions, 53 deletions
diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb
index 858ec6f3d1..5ca63396b4 100644
--- a/actionpack/test/controller/routing_test.rb
+++ b/actionpack/test/controller/routing_test.rb
@@ -22,7 +22,7 @@ class UriReservedCharactersRoutingTest < Test::Unit::TestCase
map.connect ':controller/:action/:variable'
end
- safe, unsafe = %w(: @ & = + $ , ;), %w(^ / ? # [ ])
+ safe, unsafe = %w(: @ & = + $), %w(^ / ? # [ ] , ;)
hex = unsafe.map { |char| '%' + char.unpack('H2').first.upcase }
@segment = "#{safe}#{unsafe}".freeze
@@ -1024,42 +1024,6 @@ class RouteTest < Test::Unit::TestCase
end
end
-class MapperDeprecatedRouteTest < Test::Unit::TestCase
- def setup
- @set = mock("set")
- @mapper = ActionController::Routing::RouteSet::Mapper.new(@set)
- end
-
- def test_should_add_new_and_deprecated_named_routes
- @set.expects(:add_named_route).with("new", "path", {:a => "b"})
- @set.expects(:add_deprecated_named_route).with("new", "old", "path", {:a => "b"})
- @mapper.deprecated_named_route("new", "old", "path", {:a => "b"})
- end
-
- def test_should_not_add_deprecated_named_route_if_both_are_the_same
- @set.expects(:add_named_route).with("new", "path", {:a => "b"})
- @set.expects(:add_deprecated_named_route).with("new", "new", "path", {:a => "b"}).never
- @mapper.deprecated_named_route("new", "new", "path", {:a => "b"})
- end
-end
-
-class RouteSetDeprecatedRouteTest < Test::Unit::TestCase
- def setup
- @set = ActionController::Routing::RouteSet.new
- end
-
- def test_should_add_deprecated_route
- @set.expects(:add_named_route).with("old", "path", {:a => "b"})
- @set.add_deprecated_named_route("new", "old", "path", {:a => "b"})
- end
-
- def test_should_fire_deprecation_warning_on_access
- @set.add_deprecated_named_route("new_outer_inner_path", "outer_new_inner_path", "/outers/:outer_id/inners/new", :controller => :inners)
- ActiveSupport::Deprecation.expects(:warn)
- @set.named_routes["outer_new_inner_path"]
- end
-end
-
end # uses_mocha
class RouteBuilderTest < Test::Unit::TestCase
@@ -1213,22 +1177,6 @@ class RouteBuilderTest < Test::Unit::TestCase
assert_equal nil, builder.warn_output # should only warn on the :person segment
end
- def test_comma_isnt_a_route_separator
- segments = builder.segments_for_route_path '/books/:id,:action'
- defaults = { :action => 'show' }
- assert_raise(ArgumentError) do
- builder.assign_route_options(segments, defaults, {})
- end
- end
-
- def test_semicolon_isnt_a_route_separator
- segments = builder.segments_for_route_path '/books/:id;:action'
- defaults = { :action => 'show' }
- assert_raise(ArgumentError) do
- builder.assign_route_options(segments, defaults, {})
- end
- end
-
def test_segmentation_of_dot_path
segments = builder.segments_for_route_path '/books/:action.rss'
assert builder.assign_route_options(segments, {}, {}).empty?