diff options
author | José Valim <jose.valim@gmail.com> | 2010-03-06 19:19:26 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-03-06 19:25:55 +0100 |
commit | 028e54c63df84ad1ded1fb9c438eed540564552c (patch) | |
tree | a4b24b28b6da7974530c7433dc8fe09e268b9c47 /railties/test | |
parent | 67512b9489593ddcd1c0c87ba0052380355b5400 (diff) | |
download | rails-028e54c63df84ad1ded1fb9c438eed540564552c.tar.gz rails-028e54c63df84ad1ded1fb9c438eed540564552c.tar.bz2 rails-028e54c63df84ad1ded1fb9c438eed540564552c.zip |
Add mailers to paths in case someone wants to access it directly and ensures deep nesting works in controllers.
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/application/paths_test.rb | 7 | ||||
-rw-r--r-- | railties/test/railties/shared_tests.rb | 10 |
2 files changed, 10 insertions, 7 deletions
diff --git a/railties/test/application/paths_test.rb b/railties/test/application/paths_test.rb index d1192206dd..511b8b629a 100644 --- a/railties/test/application/paths_test.rb +++ b/railties/test/application/paths_test.rb @@ -56,9 +56,10 @@ module ApplicationTests end test "booting up Rails yields a list of paths that are eager" do - assert @paths.app.eager_load? - assert @paths.app.controllers.eager_load? - assert @paths.app.helpers.eager_load? + eager_load = @paths.eager_load + assert eager_load.include?(root("app/controllers")) + assert eager_load.include?(root("app/helpers")) + assert eager_load.include?(root("app/models")) end test "environments has a glob equal to the current environment" do diff --git a/railties/test/railties/shared_tests.rb b/railties/test/railties/shared_tests.rb index 0ebc8a2d3f..83d25be5db 100644 --- a/railties/test/railties/shared_tests.rb +++ b/railties/test/railties/shared_tests.rb @@ -263,13 +263,15 @@ YAML @plugin.write "config/routes.rb", <<-RUBY Rails.application.routes.draw do namespace :admin do - match "index", :to => "admin/foo#index" + namespace :foo do + match "bar", :to => "admin/foo/bar#index" + end end end RUBY - @plugin.write "app/controllers/admin/foo_controller.rb", <<-RUBY - class Admin::FooController < ApplicationController + @plugin.write "app/controllers/admin/foo/bar_controller.rb", <<-RUBY + class Admin::Foo::BarController < ApplicationController def index render :text => "Rendered from namespace" end @@ -280,7 +282,7 @@ YAML require 'rack/test' extend Rack::Test::Methods - get "/admin/index" + get "/admin/foo/bar" assert_equal 200, last_response.status assert_equal "Rendered from namespace", last_response.body end |