Sha256: 0318b6b79e8062651b01a618e159f7beca9ad10d41ce6a1e9e28dff2a7c0adc3

Contents?: true

Size: 581 Bytes

Versions: 1

Compression:

Stored size: 581 Bytes

Contents

require 'spec_helper'
require 'dentaku/dependency_resolver'

describe Dentaku::DependencyResolver do
  it 'sorts expressions in dependency order' do
    dependencies = {"first" => ["second"], "second" => ["third"], "third" => []}
    expect(described_class.find_resolve_order(dependencies)).to eq(
      ["third", "second", "first"]
    )
  end

  it 'handles case differences' do
    dependencies = {"FIRST" => ["second"], "SeCoNd" => ["third"], "THIRD" => []}
    expect(described_class.find_resolve_order(dependencies)).to eq(
      ["THIRD", "SeCoNd", "FIRST"]
    )
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dentaku-3.5.4 spec/dependency_resolver_spec.rb