mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
silence const_set warning
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5503 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
afe49dcf5b
commit
f8486e8f10
1 changed files with 7 additions and 4 deletions
|
@ -1673,10 +1673,13 @@ class RoutingTest < Test::Unit::TestCase
|
|||
|
||||
def test_possible_controllers
|
||||
true_controller_paths = ActionController::Routing.controller_paths
|
||||
|
||||
|
||||
ActionController::Routing.use_controllers! nil
|
||||
Object.send(:const_set, :RAILS_ROOT, File.dirname(__FILE__) + '/controller_fixtures')
|
||||
|
||||
|
||||
silence_warnings do
|
||||
Object.send(:const_set, :RAILS_ROOT, File.dirname(__FILE__) + '/controller_fixtures')
|
||||
end
|
||||
|
||||
ActionController::Routing.controller_paths = [
|
||||
RAILS_ROOT, RAILS_ROOT + '/app/controllers', RAILS_ROOT + '/vendor/plugins/bad_plugin/lib'
|
||||
]
|
||||
|
@ -1734,4 +1737,4 @@ class RoutingTest < Test::Unit::TestCase
|
|||
assert_equal %w(vendor\\rails\\railties\\builtin\\rails_info vendor\\rails\\actionpack\\lib app\\controllers app\\helpers app\\models lib .), paths
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue