Sha256: 9573bef2ff8e177117cca7d6b034960d2a7fc39a0ee9c86fa8aed426e9ee4231
Contents?: true
Size: 586 Bytes
Versions: 3
Compression:
Stored size: 586 Bytes
Contents
# -*- encoding : utf-8 -*- require 'pacto' Pacto.configure do |c| c.contracts_path = 'contracts' end contracts = Pacto.load_contracts('contracts', 'http://localhost:5000') contracts.stub_providers Pacto.simulate_consumer do request 'Echo', values: nil, response: { status: 200 } # 0 contract violations request 'Ping', values: nil, response: { status: 200 } # 0 contract violations request 'Unknown (http://localhost:8000/404)', values: nil, response: { status: 500 } # 0 contract violations end Pacto.simulate_consumer :my_consumer do playback 'pacto_stenographer.log' end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
pacto-0.4.0.rc3 | samples/stenographer.rb |
pacto-0.4.0.rc2 | samples/stenographer.rb |
pacto-0.4.0.rc1 | samples/stenographer.rb |