Sha256: 0437c220bfad9b9726d9cbbfbaa1d6c0335d72b312a7402b2acc3e4abf596c0b
Contents?: true
Size: 621 Bytes
Versions: 9
Compression:
Stored size: 621 Bytes
Contents
require 'pact/provider/rspec' require 'rspec/mocks' class StubbedThing def self.stub_me end end class App def self.call env [200, {}, [StubbedThing.stub_me]] end end Pact.provider_states_for 'Consumer' do provider_state 'something is stubbed' do set_up do allow(StubbedThing).to receive(:stub_me).and_return("stubbing works") end end end # Include the ExampleMethods module after the provider states are declared # to ensure the ordering doesn't matter Pact.configure do | config | config.include RSpec::Mocks::ExampleMethods end Pact.service_provider 'Provider' do app { App } end
Version data entries
9 entries across 9 versions & 1 rubygems