diff options
author | Carl Lerche <carllerche@mac.com> | 2009-06-30 13:55:11 -0700 |
---|---|---|
committer | Carl Lerche <carllerche@mac.com> | 2009-06-30 13:55:11 -0700 |
commit | 132e6d00638dc6370fafa0f1377d3bca17eee2d1 (patch) | |
tree | 45163b0acb6cb4f03a2340ef3d37c22d89226ad4 /railties/test | |
parent | f281745056cd67c967c5a695694061f515385be8 (diff) | |
download | rails-132e6d00638dc6370fafa0f1377d3bca17eee2d1.tar.gz rails-132e6d00638dc6370fafa0f1377d3bca17eee2d1.tar.bz2 rails-132e6d00638dc6370fafa0f1377d3bca17eee2d1.zip |
Add #concat to Rails::Application::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 a1ed43ad6d..fa2f6ceee2 100644 --- a/railties/test/paths_test.rb +++ b/railties/test/paths_test.rb @@ -52,6 +52,12 @@ class PathsTest < ActiveSupport::TestCase assert_equal ["/app", "/app2"], @root.app.to_a end + test "adding multiple physical paths using concat" do + @root.app = "/app" + @root.app.concat ["/app2", "/app3"] + assert_equal ["/app", "/app2", "/app3"], @root.app.to_a + end + test "adding multiple physical paths using #unshift" do @root.app = "/app" @root.app.unshift "/app2" @@ -62,6 +68,7 @@ class PathsTest < ActiveSupport::TestCase assert_raise(RuntimeError) { Rails::Application::Root.new(["/fiz", "/biz"]) } assert_raise(NoMethodError) { @root.push "/biz" } assert_raise(NoMethodError) { @root.unshift "/biz" } + assert_raise(NoMethodError) { @root.concat ["/biz"]} assert_raise(NoMethodError) { @root << "/biz" } end |