Sha256: 347d664801ae166c6b8ee0569f1971cf346d933b02be33c880d1cd145e7b025f

Contents?: true

Size: 916 Bytes

Versions: 689

Compression:

Stored size: 916 Bytes

Contents

require 'spec_helper'

require 'puppet/graph'

describe Puppet::Graph::Key do
  it "produces the next in the sequence" do
    key = Puppet::Graph::Key.new

    expect(key.next).to be > key
  end

  it "produces a key after itself but before next" do
    key = Puppet::Graph::Key.new
    expect(key.down).to be > key
    expect(key.down).to be < key.next
  end

  it "downward keys of the same group are in sequence" do
    key = Puppet::Graph::Key.new

    first = key.down
    middle = key.down.next
    last = key.down.next.next

    expect(first).to be < middle
    expect(middle).to be < last
    expect(last).to be < key.next
  end

  it "downward keys in sequential groups are in sequence" do
    key = Puppet::Graph::Key.new

    first = key.down
    middle = key.next
    last = key.next.down

    expect(first).to be < middle
    expect(middle).to be < last
    expect(last).to be < key.next.next
  end
end

Version data entries

689 entries across 689 versions & 1 rubygems

Version Path
puppet-8.3.0 spec/unit/graph/key_spec.rb
puppet-8.3.0-x86-mingw32 spec/unit/graph/key_spec.rb
puppet-8.3.0-x64-mingw32 spec/unit/graph/key_spec.rb
puppet-8.3.0-universal-darwin spec/unit/graph/key_spec.rb
puppet-8.4.0 spec/unit/graph/key_spec.rb
puppet-8.4.0-x86-mingw32 spec/unit/graph/key_spec.rb
puppet-8.4.0-x64-mingw32 spec/unit/graph/key_spec.rb
puppet-8.4.0-universal-darwin spec/unit/graph/key_spec.rb
puppet-7.28.0 spec/unit/graph/key_spec.rb
puppet-7.28.0-x86-mingw32 spec/unit/graph/key_spec.rb
puppet-7.28.0-x64-mingw32 spec/unit/graph/key_spec.rb
puppet-7.28.0-universal-darwin spec/unit/graph/key_spec.rb
puppet-8.3.1 spec/unit/graph/key_spec.rb
puppet-8.3.1-x86-mingw32 spec/unit/graph/key_spec.rb
puppet-8.3.1-x64-mingw32 spec/unit/graph/key_spec.rb
puppet-8.3.1-universal-darwin spec/unit/graph/key_spec.rb
puppet-7.27.0 spec/unit/graph/key_spec.rb
puppet-7.27.0-x86-mingw32 spec/unit/graph/key_spec.rb
puppet-7.27.0-x64-mingw32 spec/unit/graph/key_spec.rb
puppet-7.27.0-universal-darwin spec/unit/graph/key_spec.rb