Sha256: 9af62a3fff27ee69b3d50ed5cd0269dc3b1a8c26ccd91630507392445004c73e
Contents?: true
Size: 457 Bytes
Versions: 4
Compression:
Stored size: 457 Bytes
Contents
class Bogus::VerifiesContracts extend Bogus::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
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
bogus-0.0.4 | lib/bogus/verifies_contracts.rb |
bogus-0.0.3 | lib/bogus/verifies_contracts.rb |
bogus-0.0.3.rc.2 | lib/bogus/verifies_contracts.rb |
bogus-0.0.3.rc.1 | lib/bogus/verifies_contracts.rb |