aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/paths_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/test/paths_test.rb')
-rw-r--r--railties/test/paths_test.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/railties/test/paths_test.rb b/railties/test/paths_test.rb
index c0f3887263..aa04cad033 100644
--- a/railties/test/paths_test.rb
+++ b/railties/test/paths_test.rb
@@ -22,13 +22,14 @@ class PathsTest < ActiveSupport::TestCase
root = Rails::Paths::Root.new(nil)
root.add "app"
root.path = "/root"
- assert_equal ["app"], root["app"]
+ assert_equal ["app"], root["app"].to_ary
assert_equal ["/root/app"], root["app"].to_a
end
test "creating a root level path" do
@root.add "app"
assert_equal ["/foo/bar/app"], @root["app"].to_a
+ assert_equal [Pathname.new("/foo/bar/app")], @root["app"].paths
end
test "creating a root level path with options" do
@@ -91,10 +92,6 @@ class PathsTest < ActiveSupport::TestCase
assert_equal ["/foo/bar/app2", "/foo/bar/app"], @root["app"].to_a
end
- test "the root can only have one physical path" do
- assert_raise(RuntimeError) { Rails::Paths::Root.new(["/fiz", "/biz"]) }
- end
-
test "it is possible to add a path that should be autoloaded only once" do
@root.add "app", :with => "/app"
@root["app"].autoload_once!
@@ -195,6 +192,7 @@ class PathsTest < ActiveSupport::TestCase
@root["app"] = "/app"
@root["app"].glob = "*.rb"
assert_equal "*.rb", @root["app"].glob
+ assert_equal [Pathname.new("/app")], @root["app"].paths
end
test "it should be possible to override a path's default glob without assignment" do