aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/paths_test.rb
diff options
context:
space:
mode:
authorKir Shatrov <shatrov@me.com>2015-08-04 17:53:15 +0200
committerKir Shatrov <shatrov@me.com>2015-08-10 00:17:49 +0200
commitf50e90a1aeaee0e1e907e51cd2a9349d0af2c087 (patch)
treea602a07ffa8249e60b4538de3c8c7c4840405aff /railties/test/paths_test.rb
parent7a3ca69959e312a215d5e8144fca79a08654fd89 (diff)
downloadrails-f50e90a1aeaee0e1e907e51cd2a9349d0af2c087.tar.gz
rails-f50e90a1aeaee0e1e907e51cd2a9349d0af2c087.tar.bz2
rails-f50e90a1aeaee0e1e907e51cd2a9349d0af2c087.zip
Reload I18n locales in development
Diffstat (limited to 'railties/test/paths_test.rb')
-rw-r--r--railties/test/paths_test.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/railties/test/paths_test.rb b/railties/test/paths_test.rb
index 12630e4d01..96b54c7264 100644
--- a/railties/test/paths_test.rb
+++ b/railties/test/paths_test.rb
@@ -62,6 +62,13 @@ class PathsTest < ActiveSupport::TestCase
assert_equal ["/foo/bar/baz"], @root["app/models"].to_a
end
+ test "absolute current path" do
+ @root.add "config"
+ @root.add "config/locales"
+
+ assert_equal "/foo/bar/config/locales", @root["config/locales"].absolute_current
+ end
+
test "adding multiple physical paths as an array" do
@root.add "app", with: ["/app", "/app2"]
assert_equal ["/app", "/app2"], @root["app"].to_a
@@ -215,6 +222,12 @@ class PathsTest < ActiveSupport::TestCase
assert_equal "*.rb", @root["app"].glob
end
+ test "it should be possible to get extensions by glob" do
+ @root["app"] = "/app"
+ @root["app"].glob = "*.{rb,yml}"
+ assert_equal ["rb", "yml"], @root["app"].extensions
+ end
+
test "it should be possible to override a path's default glob without assignment" do
@root.add "app", with: "/app", glob: "*.rb"
assert_equal "*.rb", @root["app"].glob