aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/paths_test.rb
diff options
context:
space:
mode:
authorJose and Yehuda <wycats@gmail.com>2012-04-25 16:06:20 -0500
committerYehuda Katz <wycats@gmail.com>2012-04-25 16:07:17 -0500
commit6acebb38bc0637bc05c19d87f8767f16ce79189b (patch)
treee37fa39f516e16c1d36e3b5202e9231c56aa4305 /railties/test/paths_test.rb
parent3c100cfe8ed5a875b0bbdc8fa4e8f2b0cbf78676 (diff)
downloadrails-6acebb38bc0637bc05c19d87f8767f16ce79189b.tar.gz
rails-6acebb38bc0637bc05c19d87f8767f16ce79189b.tar.bz2
rails-6acebb38bc0637bc05c19d87f8767f16ce79189b.zip
Allow loading external route files from the router
This feature enables the ability to load an external routes file from the router via: draw :filename External routes files go in +config/routes+. This feature works in both engines and applications.
Diffstat (limited to 'railties/test/paths_test.rb')
-rw-r--r--railties/test/paths_test.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/railties/test/paths_test.rb b/railties/test/paths_test.rb
index d334034e7d..aa04cad033 100644
--- a/railties/test/paths_test.rb
+++ b/railties/test/paths_test.rb
@@ -29,6 +29,7 @@ class PathsTest < ActiveSupport::TestCase
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
@@ -191,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