class Shokkenki::Consumer::Model::Provider

Attributes

stubber[R]

Public Class Methods

new(attributes) click to toggle source
Calls superclass method
# File lib/shokkenki/consumer/model/provider.rb, line 14
def initialize attributes
  super attributes
  @stubber = attributes[:stubber] || Shokkenki::Consumer::Stubber::LocalServerStubber.new({})
end

Public Instance Methods

assert_all_interactions_used!() click to toggle source
# File lib/shokkenki/consumer/model/provider.rb, line 25
def assert_all_interactions_used!
  unused_interactions = @stubber.unused_interactions
  message = "In provider '#{@name}' the following interactions were never used: #{JSON.pretty_generate(unused_interactions)}"
  raise message unless unused_interactions.empty?
end
assert_all_requests_matched!() click to toggle source
# File lib/shokkenki/consumer/model/provider.rb, line 19
def assert_all_requests_matched!
  unmatched_requests = @stubber.unmatched_requests
  message = "In provider '#{@name}' the following requests were not matched: #{JSON.pretty_generate(unmatched_requests)}"
  raise message unless unmatched_requests.empty?
end