Sha256: 80785c402e3d5f14b8331d91d0429ed6478290418582eae022ab721ffa14cbf2

Contents?: true

Size: 472 Bytes

Versions: 2

Compression:

Stored size: 472 Bytes

Contents

require 'abstract_unit'

class LoadPathsTest < ActiveSupport::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
    }
    load_paths_count[File.expand_path('../../lib', __FILE__)] -= 1

    load_paths_count.select! { |k, v| v > 1 }
    assert load_paths_count.empty?, load_paths_count.inspect
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
activejob-lock-0.0.2 rails/activesupport/test/load_paths_test.rb
activejob-lock-0.0.1 rails/activesupport/test/load_paths_test.rb