aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/resources_test.rb
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2010-01-17 03:20:30 +0530
committerPratik Naik <pratiknaik@gmail.com>2010-01-17 03:20:30 +0530
commitb04230e3bbf912d60601e9e7b797c4cd43581d51 (patch)
tree97a2f784a2ec2bfae4f960af56a9280dad6f7774 /actionpack/test/controller/resources_test.rb
parent867829b187969607aa12f2b0457f25da9c204db0 (diff)
parent6e3bee6cf1f0d2684152292db0a8b757249824fd (diff)
downloadrails-b04230e3bbf912d60601e9e7b797c4cd43581d51.tar.gz
rails-b04230e3bbf912d60601e9e7b797c4cd43581d51.tar.bz2
rails-b04230e3bbf912d60601e9e7b797c4cd43581d51.zip
Merge remote branch 'mainstream/master'
Conflicts: actionpack/lib/action_controller/metal/flash.rb
Diffstat (limited to 'actionpack/test/controller/resources_test.rb')
-rw-r--r--actionpack/test/controller/resources_test.rb52
1 files changed, 21 insertions, 31 deletions
diff --git a/actionpack/test/controller/resources_test.rb b/actionpack/test/controller/resources_test.rb
index 1a03396ae9..01ed491732 100644
--- a/actionpack/test/controller/resources_test.rb
+++ b/actionpack/test/controller/resources_test.rb
@@ -30,16 +30,6 @@ module Backoffice
end
class ResourcesTest < ActionController::TestCase
- # The assertions in these tests are incompatible with the hash method
- # optimisation. This could indicate user level problems
- def setup
- ActionController::Base.optimise_named_routes = false
- end
-
- def teardown
- ActionController::Base.optimise_named_routes = true
- end
-
def test_should_arrange_actions
resource = ActionDispatch::Routing::DeprecatedMapper::Resource.new(:messages,
:collection => { :rss => :get, :reorder => :post, :csv => :post },
@@ -304,27 +294,27 @@ class ResourcesTest < ActionController::TestCase
end
end
- def test_member_when_changed_default_restful_actions_and_path_names_not_specified
- default_path_names = ActionController::Base.resources_path_names
- ActionController::Base.resources_path_names = {:new => 'nuevo', :edit => 'editar'}
-
- with_restful_routing :messages do
- new_options = { :action => 'new', :controller => 'messages' }
- new_path = "/messages/nuevo"
- edit_options = { :action => 'edit', :id => '1', :controller => 'messages' }
- edit_path = "/messages/1/editar"
-
- assert_restful_routes_for :messages do |options|
- assert_recognizes(options.merge(new_options), :path => new_path, :method => :get)
- end
-
- assert_restful_routes_for :messages do |options|
- assert_recognizes(options.merge(edit_options), :path => edit_path, :method => :get)
- end
- end
- ensure
- ActionController::Base.resources_path_names = default_path_names
- end
+ # def test_member_when_changed_default_restful_actions_and_path_names_not_specified
+ # default_path_names = ActionController::Base.resources_path_names
+ # ActionController::Base.resources_path_names = {:new => 'nuevo', :edit => 'editar'}
+ #
+ # with_restful_routing :messages do
+ # new_options = { :action => 'new', :controller => 'messages' }
+ # new_path = "/messages/nuevo"
+ # edit_options = { :action => 'edit', :id => '1', :controller => 'messages' }
+ # edit_path = "/messages/1/editar"
+ #
+ # assert_restful_routes_for :messages do |options|
+ # assert_recognizes(options.merge(new_options), :path => new_path, :method => :get)
+ # end
+ #
+ # assert_restful_routes_for :messages do |options|
+ # assert_recognizes(options.merge(edit_options), :path => edit_path, :method => :get)
+ # end
+ # end
+ # ensure
+ # ActionController::Base.resources_path_names = default_path_names
+ # end
def test_with_two_member_actions_with_same_method
[:put, :post].each do |method|