diff options
author | Carlhuda <carlhuda@engineyard.com> | 2009-12-21 16:03:20 -0800 |
---|---|---|
committer | Carlhuda <carlhuda@engineyard.com> | 2009-12-21 16:03:26 -0800 |
commit | b0b4ae970c1cb586235bcfbc669d43475c7fe684 (patch) | |
tree | c9d313351860bb7d63676b6bbd6e69de5bd78a10 /railties/test/isolation | |
parent | a110ff0fca45c6cc74c0da5d8dcdabeed43e78b1 (diff) | |
download | rails-b0b4ae970c1cb586235bcfbc669d43475c7fe684.tar.gz rails-b0b4ae970c1cb586235bcfbc669d43475c7fe684.tar.bz2 rails-b0b4ae970c1cb586235bcfbc669d43475c7fe684.zip |
test.rb, dev.rb, and production.rb just reopen the Application class; no more hax required
Diffstat (limited to 'railties/test/isolation')
-rw-r--r-- | railties/test/isolation/abstract_unit.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/railties/test/isolation/abstract_unit.rb b/railties/test/isolation/abstract_unit.rb index ba8b35d5cc..6562a31d9e 100644 --- a/railties/test/isolation/abstract_unit.rb +++ b/railties/test/isolation/abstract_unit.rb @@ -89,6 +89,13 @@ module TestHelpers end end + routes = File.read("#{app_path}/config/routes.rb") + if routes =~ /(\n\s*end\s*)\Z/ + File.open("#{app_path}/config/routes.rb", 'w') do |f| + f.puts $` + "\nmatch ':controller(/:action(/:id))(.:format)'\n" + $1 + end + end + add_to_config 'config.action_controller.session = { :key => "_myapp_session", :secret => "bac838a849c1d5c4de2e6a50af826079" }' end |