Sha256: c02d1d32ccdf5ca2f22eacd6c682e2fd4cd063a070d43c7d0a8b7278acea8455

Contents?: true

Size: 611 Bytes

Versions: 48

Compression:

Stored size: 611 Bytes

Contents

require 'spec_helper'
require 'pact_broker/domain/pacticipant'

module PactBroker
  module Domain
    describe Pacticipant do
      describe "validate" do
        context "with all valid attributes" do
          subject { Pacticipant.new name: 'Name' }

          it "returns an empty array" do
            expect(subject.validate).to eq []
          end
        end

        context "with no name" do
          subject { Pacticipant.new }

          it "returns an error" do
            expect(subject.validate).to eq ["Missing required attribute 'name'"]
          end
        end
      end
    end
  end
end

Version data entries

48 entries across 48 versions & 1 rubygems

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