Sha256: 5f813064ff0a49804162afc61a2260c51d538a04f5713a5a9f4beb760157726f
Contents?: true
Size: 500 Bytes
Versions: 7
Compression:
Stored size: 500 Bytes
Contents
module Bogus class InteractionsRepository def initialize @interactions = Hash.new { |hash, fake_name| hash[fake_name] = [] } end def record(fake_name, method, *args, &block) @interactions[fake_name] << Interaction.new(method, args, &block) end def recorded?(fake_name, interaction) @interactions[fake_name].any?{ |i| Interaction.same?(stubbed: interaction, recorded: i) } end def for_fake(fake_name) @interactions[fake_name] end end end
Version data entries
7 entries across 7 versions & 1 rubygems