diff options
author | José Valim <jose.valim@gmail.com> | 2010-01-23 22:30:17 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-01-23 22:30:17 +0100 |
commit | b17e358e3df34c03019e357f693611618092e1d6 (patch) | |
tree | b960982715bd307aab062dc3f1621edbf831a8e0 /railties/test | |
parent | 788fce2550ed587d86d239d8fcd488f919d15b5d (diff) | |
download | rails-b17e358e3df34c03019e357f693611618092e1d6.tar.gz rails-b17e358e3df34c03019e357f693611618092e1d6.tar.bz2 rails-b17e358e3df34c03019e357f693611618092e1d6.zip |
Move configuration to subfolders.
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/initializer/path_test.rb | 6 | ||||
-rw-r--r-- | railties/test/paths_test.rb | 12 |
2 files changed, 9 insertions, 9 deletions
diff --git a/railties/test/initializer/path_test.rb b/railties/test/initializer/path_test.rb index 4f475fae11..54bdddbdf2 100644 --- a/railties/test/initializer/path_test.rb +++ b/railties/test/initializer/path_test.rb @@ -79,17 +79,17 @@ module InitializerTests test "controller paths include builtin in development mode" do Rails.env.replace "development" - assert Rails::Configuration.new("/").paths.app.controllers.paths.any? { |p| p =~ /builtin/ } + assert Rails::Application::Configuration.new("/").paths.app.controllers.paths.any? { |p| p =~ /builtin/ } end test "controller paths does not have builtin_directories in test mode" do Rails.env.replace "test" - assert !Rails::Configuration.new("/").paths.app.controllers.paths.any? { |p| p =~ /builtin/ } + assert !Rails::Application::Configuration.new("/").paths.app.controllers.paths.any? { |p| p =~ /builtin/ } end test "controller paths does not have builtin_directories in production mode" do Rails.env.replace "production" - assert !Rails::Configuration.new("/").paths.app.controllers.paths.any? { |p| p =~ /builtin/ } + assert !Rails::Application::Configuration.new("/").paths.app.controllers.paths.any? { |p| p =~ /builtin/ } end end diff --git a/railties/test/paths_test.rb b/railties/test/paths_test.rb index 343926340a..eafe7a64e1 100644 --- a/railties/test/paths_test.rb +++ b/railties/test/paths_test.rb @@ -3,22 +3,22 @@ require 'rails/paths' class PathsTest < ActiveSupport::TestCase def setup - @root = Rails::Application::Root.new("/foo/bar") + @root = Rails::Paths::Root.new("/foo/bar") end test "the paths object is initialized with the root path" do - root = Rails::Application::Root.new("/fiz/baz") + root = Rails::Paths::Root.new("/fiz/baz") assert_equal "/fiz/baz", root.path end test "the paths object can be initialized with nil" do assert_nothing_raised do - Rails::Application::Root.new(nil) + Rails::Paths::Root.new(nil) end end test "a paths object initialized with nil can be updated" do - root = Rails::Application::Root.new(nil) + root = Rails::Paths::Root.new(nil) root.app = "app" root.path = "/root" assert_equal ["/root/app"], root.app.to_a @@ -30,7 +30,7 @@ class PathsTest < ActiveSupport::TestCase end test "raises exception if root path never set" do - root = Rails::Application::Root.new(nil) + root = Rails::Paths::Root.new(nil) root.app = "app" assert_raises RuntimeError do root.app.to_a @@ -110,7 +110,7 @@ class PathsTest < ActiveSupport::TestCase end test "the root can only have one physical path" do - assert_raise(RuntimeError) { Rails::Application::Root.new(["/fiz", "/biz"]) } + assert_raise(RuntimeError) { Rails::Paths::Root.new(["/fiz", "/biz"]) } assert_raise(RuntimeError) { @root.push "/biz" } assert_raise(RuntimeError) { @root.unshift "/biz" } assert_raise(RuntimeError) { @root.concat ["/biz"]} |