Sha256: afc696e2670cdb23d34a90c32fa0740ff1b42bed139b05684bf13a11a81530e1

Contents?: true

Size: 777 Bytes

Versions: 689

Compression:

Stored size: 777 Bytes

Contents

require 'spec_helper'
require 'matchers/include_in_order'

describe "Matching whether elements are included in order" do
  context "an empty array" do
    it "is included in an empty array" do
      expect([]).to include_in_order()
    end

    it "is included in a non-empty array" do
      expect([1]).to include_in_order()
    end
  end

  it "[1,2,3] is included in [0,1,2,3,4]" do
    expect([0,1,2,3,4]).to include_in_order(1,2,3)
  end

  it "[2,1] is not included in order in [1,2]" do
    expect([1,2]).not_to include_in_order(2,1)
  end

  it "[2,4,6] is included in order in [1,2,3,4,5,6]" do
    expect([1,2,3,4,5,6]).to include_in_order(2,4,6)
  end

  it "overlapping ordered array is not included" do
    expect([1,2,3]).not_to include_in_order(2,3,4)
  end
end

Version data entries

689 entries across 689 versions & 1 rubygems

Version Path
puppet-6.27.0 spec/lib/matchers/include_in_order_spec.rb
puppet-6.27.0-x86-mingw32 spec/lib/matchers/include_in_order_spec.rb
puppet-6.27.0-x64-mingw32 spec/lib/matchers/include_in_order_spec.rb
puppet-6.27.0-universal-darwin spec/lib/matchers/include_in_order_spec.rb
puppet-7.16.0 spec/lib/matchers/include_in_order_spec.rb
puppet-7.16.0-x86-mingw32 spec/lib/matchers/include_in_order_spec.rb
puppet-7.16.0-x64-mingw32 spec/lib/matchers/include_in_order_spec.rb
puppet-7.16.0-universal-darwin spec/lib/matchers/include_in_order_spec.rb
puppet-7.15.0 spec/lib/matchers/include_in_order_spec.rb
puppet-7.15.0-x86-mingw32 spec/lib/matchers/include_in_order_spec.rb
puppet-7.15.0-x64-mingw32 spec/lib/matchers/include_in_order_spec.rb
puppet-7.15.0-universal-darwin spec/lib/matchers/include_in_order_spec.rb
puppet-6.26.0 spec/lib/matchers/include_in_order_spec.rb
puppet-6.26.0-x86-mingw32 spec/lib/matchers/include_in_order_spec.rb
puppet-6.26.0-x64-mingw32 spec/lib/matchers/include_in_order_spec.rb
puppet-6.26.0-universal-darwin spec/lib/matchers/include_in_order_spec.rb
puppet-7.14.0 spec/lib/matchers/include_in_order_spec.rb
puppet-7.14.0-x86-mingw32 spec/lib/matchers/include_in_order_spec.rb
puppet-7.14.0-x64-mingw32 spec/lib/matchers/include_in_order_spec.rb
puppet-7.14.0-universal-darwin spec/lib/matchers/include_in_order_spec.rb