Sha256: eb710e2e9a5392519fb1b7c33c9b47a0ee37fcd4ff785e747e2cc83803ad375f
Contents?: true
Size: 525 Bytes
Versions: 3
Compression:
Stored size: 525 Bytes
Contents
# -*- encoding : utf-8 -*- module Pacto def self.providers @providers ||= {} end class Provider include Resettable def self.reset! Pacto.providers.clear end def actor @actor ||= Pacto::Actors::FromExamples.new end def actor=(actor) fail ArgumentError, 'The actor must respond to :build_response' unless actor.respond_to? :build_response @actor = actor end def response_for(contract, data = {}) actor.build_response contract, data end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
pacto-0.4.0.rc3 | lib/pacto/provider.rb |
pacto-0.4.0.rc2 | lib/pacto/provider.rb |
pacto-0.4.0.rc1 | lib/pacto/provider.rb |