diff --git a/spec/spectator/mocks/reference_mock_registry_spec.cr b/spec/spectator/mocks/reference_mock_registry_spec.cr index 1d34f87..1270eff 100644 --- a/spec/spectator/mocks/reference_mock_registry_spec.cr +++ b/spec/spectator/mocks/reference_mock_registry_spec.cr @@ -35,7 +35,7 @@ Spectator.describe Spectator::ReferenceMockRegistry do obj1 = "foo" obj2 = "bar" registry[obj2] << Spectator::ValueStub.new(:obj2, 42) - expect { registry.fetch(obj2) { no_stubs } }.to_not change { registry[obj2] } + expect { registry.fetch(obj1) { no_stubs } }.to_not change { registry[obj2] } end end end diff --git a/src/spectator/mocks/stubbable.cr b/src/spectator/mocks/stubbable.cr index 9a1dce5..8046922 100644 --- a/src/spectator/mocks/stubbable.cr +++ b/src/spectator/mocks/stubbable.cr @@ -195,7 +195,7 @@ module Spectator {% original = "previous_def#{" { |*_spectator_yargs| yield *_spectator_yargs }".id if method.accepts_block?}".id %} {% end %} - + {% # Reconstruct the method signature. # I wish there was a better way of doing this, but there isn't (at least not that I'm aware of). # This chunk of code must reconstruct the method signature exactly as it was originally.