Sha256: c994675caaac05cbb268f9d0b101ea070bff2c9a8f7fa7b4569721bc2554a944

Contents?: true

Size: 609 Bytes

Versions: 2

Compression:

Stored size: 609 Bytes

Contents

require_relative 'spec_helper'
require 'pact/messages'

Pact::Messages.service_consumer 'Message Consumer' do
  has_pact_with 'Message Provider' do
    mock_service 'message_provider_service'
  end
end

Pact::Messages.build_mock_service(:message_provider_service) do |service|
  service.given('User subscribed')
    .provide(
        'first_name' => like('John'),
        'last_name'  => like('Smith'),
        'subscribed' => true,
    )

  service.given('User unsubscribed')
    .provide(
        'first_name' => like('John'),
        'last_name'  => like('Smith'),
        'subscribed' => false,
    )
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pact-messages-0.1.1 example/user-app/spec/pact_helper.rb
pact-messages-0.1.0 example/user-app/spec/pact_helper.rb