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.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/railties/test/paths_test.rb b/railties/test/paths_test.rb
index 5d6b6f9f72..2b38f0975d 100644
--- a/railties/test/paths_test.rb
+++ b/railties/test/paths_test.rb
@@ -200,6 +200,13 @@ class PathsTest < ActiveSupport::TestCase
assert_equal "*.rb", @root["app"].glob
end
+ test "it should be possible to replace a path and persist the original paths glob" do
+ @root.add "app", :glob => "*.rb"
+ @root["app"] = "app2"
+ assert_equal ["/foo/bar/app2"], @root["app"].paths
+ assert_equal "*.rb", @root["app"].glob
+ end
+
test "a path can be added to the load path" do
@root["app"] = "app"
@root["app"].load_path!