Permalink
Browse files

optimise_named_routes is unnecessary

  • Loading branch information...
1 parent 9038a4a commit 0f51e45307508d72f65b733dbbbd1c62f27a8bef @josh josh committed Jan 14, 2010
@@ -31,11 +31,6 @@ class << self
@before_filter_chain_aborted @_headers @_params
@_flash @_response)
- # Indicates whether or not optimise the generated named
- # route helper methods
- cattr_accessor :optimise_named_routes
- self.optimise_named_routes = true
-
cattr_accessor :resources_path_names
self.resources_path_names = { :new => 'new', :edit => 'edit' }
@@ -30,16 +30,6 @@ class ImagesController < ResourcesController; end
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 },
@@ -82,9 +82,6 @@ class LegacyRouteSetTests < Test::Unit::TestCase
attr_reader :rs
def setup
- # These tests assume optimisation is on, so re-enable it.
- ActionController::Base.optimise_named_routes = true
-
@rs = ::ActionController::Routing::RouteSet.new
end
@@ -632,7 +629,6 @@ def test_failed_requirements_raises_exception_with_violated_requirements
end
def test_routes_changed_correctly_after_clear
- ActionController::Base.optimise_named_routes = true
rs = ::ActionController::Routing::RouteSet.new
rs.draw do |r|
r.connect 'ca', :controller => 'ca', :action => "aa"

0 comments on commit 0f51e45

Please sign in to comment.