example/user-app/spec/pact_helper.rb in pact-messages-0.1.1 vs example/user-app/spec/pact_helper.rb in pact-messages-0.2.0
- old
+ new
@@ -1,24 +1,24 @@
-require_relative 'spec_helper'
-require 'pact/messages'
+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'
+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 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,
+ service.given("User unsubscribed")
+ .provide(
+ "first_name" => like("John"),
+ "last_name" => like("Smith"),
+ "subscribed" => false,
)
end