diff options
author | José Valim <jose.valim@plataformatec.com.br> | 2012-07-01 02:54:33 -0700 |
---|---|---|
committer | José Valim <jose.valim@plataformatec.com.br> | 2012-07-01 02:54:33 -0700 |
commit | 2ee3fa1a48513a2c42833e2e1f60fe03769bc295 (patch) | |
tree | 3560d14f79c5614138ab5261e49e793bdd65177f /railties/test | |
parent | 98b46bf5e201307cae56ee14bf41363a539779c5 (diff) | |
parent | 0f4d005501c4230fcdf8d64d530639f5bcda6086 (diff) | |
download | rails-2ee3fa1a48513a2c42833e2e1f60fe03769bc295.tar.gz rails-2ee3fa1a48513a2c42833e2e1f60fe03769bc295.tar.bz2 rails-2ee3fa1a48513a2c42833e2e1f60fe03769bc295.zip |
Merge pull request #6910 from mulder/fix_path_glob
Persist glob when replacing a path
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/paths_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/railties/test/paths_test.rb b/railties/test/paths_test.rb index d334034e7d..491c45da70 100644 --- a/railties/test/paths_test.rb +++ b/railties/test/paths_test.rb @@ -198,6 +198,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! |