Sha256: 29285c4536b362937b999ef6f20e468b815227d38d2712c3100a014442cbc0c7

Contents?: true

Size: 367 Bytes

Versions: 2

Compression:

Stored size: 367 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
    raise Bogus::ContractNotFulfilled.new(fake_name => missed) unless missed.empty?
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bogus-0.0.2 lib/bogus/verifies_contracts.rb
bogus-0.0.1 lib/bogus/verifies_contracts.rb