Skip to content

Instantly share code, notes, and snippets.

@azusa
Created February 26, 2017 12:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save azusa/d85b8a016a92365df9419cc0a4e4d059 to your computer and use it in GitHub Desktop.
Save azusa/d85b8a016a92365df9419cc0a4e4d059 to your computer and use it in GitHub Desktop.
bundle exec rspec spec/service_providers/animal_service_client_spec.rb
[git][* master]:$ bundle exec rspec spec/service_providers/animal_service_client_spec.rb [~/pact-example/zoo-app]
F
Failures:
1) AnimalServiceClient get_alligator returns a alligator
Got 1 failure and 1 other error:
1.1) Failure/Error: expect(subject.get_alligator).to eq(Alligator.new('Betty'))
expected: #<Alligator:0x007f99100248c8 @name="Betty">
got: nil
(compared using ==)
# ./spec/service_providers/animal_service_client_spec.rb:27:in `block (3 levels) in <top (required)>'
1.2) Failure/Error: raise "\e[31m#{response.body}\e[m" unless response.is_a? Net::HTTPSuccess
RuntimeError:
Actual interactions do not match expected interactions for mock Animal Service.
Missing requests:
GET /alligator
See log/animal_mock_service.log for details.
# ./vendor/bundle/ruby/2.3.0/gems/pact-mock_service-0.12.1/lib/pact/mock_service/client.rb:16:in `verify'
# ./vendor/bundle/ruby/2.3.0/gems/pact-1.10.0/lib/pact/consumer/consumer_contract_builder.rb:37:in `verify'
# ./vendor/bundle/ruby/2.3.0/gems/pact-1.10.0/lib/pact/consumer/configuration/mock_service.rb:83:in `block in setup_verification'
# ./vendor/bundle/ruby/2.3.0/gems/pact-1.10.0/lib/pact/consumer/spec_hooks.rb:26:in `block in after_each'
# ./vendor/bundle/ruby/2.3.0/gems/pact-1.10.0/lib/pact/consumer/spec_hooks.rb:25:in `each'
# ./vendor/bundle/ruby/2.3.0/gems/pact-1.10.0/lib/pact/consumer/spec_hooks.rb:25:in `after_each'
# ./vendor/bundle/ruby/2.3.0/gems/pact-1.10.0/lib/pact/consumer/rspec.rb:29:in `block (2 levels) in <top (required)>'
Finished in 0.01375 seconds (files took 0.37835 seconds to load)
1 example, 1 failure
Failed examples:
rspec ./spec/service_providers/animal_service_client_spec.rb:26 # AnimalServiceClient get_alligator returns a alligator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment