lib/bogus/interactions_repository.rb in bogus-0.1.0 vs lib/bogus/interactions_repository.rb in bogus-0.1.1
- old
+ new
@@ -7,10 +7,10 @@
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)
+ @interactions[fake_name].any?{ |i| Interaction.same?(stubbed: interaction, recorded: i) }
end
def for_fake(fake_name)
@interactions[fake_name]
end