Sha256: 2ad7865682df2a8394e72f646ab11dbf1a2625836dea24f244a2bb0dd090dfb2
Contents?: true
Size: 457 Bytes
Versions: 7
Compression:
Stored size: 457 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].include?(interaction) end def for_fake(fake_name) @interactions[fake_name] end end end
Version data entries
7 entries across 7 versions & 1 rubygems