Sha256: 6db1bb72ced4d87acd7072d837d56e31d9cca0358390c7fa599a6b1358afc55d

Contents?: true

Size: 903 Bytes

Versions: 47

Compression:

Stored size: 903 Bytes

Contents

require 'pact_broker/pacts/selectors'
require 'pact_broker/pacts/selector'

module PactBroker
  module Pacts
    describe Selectors do
      let(:selector_1) { Selector.overall_latest }
      let(:selector_2) { Selector.latest_for_tag('dev') }
      let(:selectors_1) { Selectors.new([selector_1]) }
      let(:selectors_2) { Selectors.new([selector_2]) }
      let(:selectors_array) { [selectors_1, selectors_2] }

      describe "intialize" do
        it "allows an array of Selector objects" do
          expect(Selectors.new([selector_1, selector_2]).size).to eq 2
        end

        it "allows arguments of Selector objects" do
          expect(Selectors.new(selector_1, selector_2).size).to eq 2
        end
      end

      describe "+" do
        it "returns an object of type Selector" do
          expect(selectors_1 + selectors_2).to be_a(Selectors)
        end
      end
    end
  end
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
pact_broker-2.79.1 spec/lib/pact_broker/pacts/selectors_spec.rb
pact_broker-2.79.0 spec/lib/pact_broker/pacts/selectors_spec.rb
pact_broker-2.78.1 spec/lib/pact_broker/pacts/selectors_spec.rb
pact_broker-2.78.0 spec/lib/pact_broker/pacts/selectors_spec.rb
pact_broker-2.77.0 spec/lib/pact_broker/pacts/selectors_spec.rb
pact_broker-2.76.2 spec/lib/pact_broker/pacts/selectors_spec.rb
pact_broker-2.76.1 spec/lib/pact_broker/pacts/selectors_spec.rb
pact_broker-2.76.0 spec/lib/pact_broker/pacts/selectors_spec.rb
pact_broker-2.75.0 spec/lib/pact_broker/pacts/selectors_spec.rb
pact_broker-2.74.1 spec/lib/pact_broker/pacts/selectors_spec.rb
pact_broker-2.74.0 spec/lib/pact_broker/pacts/selectors_spec.rb
pact_broker-2.73.0 spec/lib/pact_broker/pacts/selectors_spec.rb
pact_broker-2.72.0 spec/lib/pact_broker/pacts/selectors_spec.rb
pact_broker-2.71.0 spec/lib/pact_broker/pacts/selectors_spec.rb
pact_broker-2.70.0 spec/lib/pact_broker/pacts/selectors_spec.rb
pact_broker-2.69.0 spec/lib/pact_broker/pacts/selectors_spec.rb
pact_broker-2.68.1 spec/lib/pact_broker/pacts/selectors_spec.rb
pact_broker-2.68.0 spec/lib/pact_broker/pacts/selectors_spec.rb
pact_broker-2.67.0 spec/lib/pact_broker/pacts/selectors_spec.rb
pact_broker-2.66.0 spec/lib/pact_broker/pacts/selectors_spec.rb