diff options
Diffstat (limited to 'activesupport/test/load_paths_test.rb')
-rw-r--r-- | activesupport/test/load_paths_test.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/activesupport/test/load_paths_test.rb b/activesupport/test/load_paths_test.rb new file mode 100644 index 0000000000..683ba3dd4e --- /dev/null +++ b/activesupport/test/load_paths_test.rb @@ -0,0 +1,14 @@ +require 'abstract_unit' + +class LoadPathsTest < Test::Unit::TestCase + def test_uniq_load_paths + load_paths_count = $LOAD_PATH.inject({}) { |paths, path| + expanded_path = File.expand_path(path) + paths[expanded_path] ||= 0 + paths[expanded_path] += 1 + paths + } + + assert_equal [], load_paths_count.select { |k, v| v > 1 }, $LOAD_PATH.inspect + end +end |