From 132e6d00638dc6370fafa0f1377d3bca17eee2d1 Mon Sep 17 00:00:00 2001 From: Carl Lerche Date: Tue, 30 Jun 2009 13:55:11 -0700 Subject: Add #concat to Rails::Application::Path --- railties/test/paths_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'railties/test/paths_test.rb') 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 -- cgit v1.2.3