Sha256: ae5300dd3a4b02e0430f5182ea2782e8aec827463e9cc48f57e7d91d21946e14
Contents?: true
Size: 486 Bytes
Versions: 8
Compression:
Stored size: 486 Bytes
Contents
module Bogus class VerifiesContracts extend Takes takes :doubled_interactions, :real_interactions def verify(fake_name) missed = doubled_interactions.for_fake(fake_name).reject do |interaction| real_interactions.recorded?(fake_name, interaction) end unless missed.empty? actual = real_interactions.for_fake(fake_name) raise Bogus::ContractNotFulfilled.new(fake_name, missed: missed, actual: actual) end end end end
Version data entries
8 entries across 8 versions & 1 rubygems