From a6aa00eb38f34f5cb944ad282aa0c0d1a0300fca Mon Sep 17 00:00:00 2001 From: Michael Miller Date: Fri, 13 Dec 2019 19:17:08 -0700 Subject: [PATCH] Fix double default stub with type --- src/spectator/mocks/double.cr | 2 +- src/spectator/mocks/verifying_double.cr | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/spectator/mocks/double.cr b/src/spectator/mocks/double.cr index de218ba..9f9a3b1 100644 --- a/src/spectator/mocks/double.cr +++ b/src/spectator/mocks/double.cr @@ -62,7 +62,7 @@ module Spectator::Mocks {% if body && !body.is_a?(Nop) %} {{body.body}} {% else %} - %args = ::Spectator::Mocks::GenericArguments.create({{params.splat}}) + %args = ::Spectator::Mocks::GenericArguments.create({{args.splat}}) %call = ::Spectator::Mocks::GenericMethodCall.new({{name.symbolize}}, %args) unless ::Spectator::Harness.current.mocks.expected?(self, %call) raise ::Spectator::Mocks::UnexpectedMessageError.new("#{self} received unexpected message {{name}}") diff --git a/src/spectator/mocks/verifying_double.cr b/src/spectator/mocks/verifying_double.cr index 3f451cb..ba77f61 100644 --- a/src/spectator/mocks/verifying_double.cr +++ b/src/spectator/mocks/verifying_double.cr @@ -68,7 +68,7 @@ module Spectator::Mocks {% if body && !body.is_a?(Nop) %} {{body.body}} {% else %} - %args = ::Spectator::Mocks::GenericArguments.create({{params.splat}}) + %args = ::Spectator::Mocks::GenericArguments.create({{args.splat}}) %call = ::Spectator::Mocks::GenericMethodCall.new({{name.symbolize}}, %args) unless ::Spectator::Harness.current.mocks.expected?(self, %call) raise ::Spectator::Mocks::UnexpectedMessageError.new("#{self} received unexpected message {{name}}")