From dd69cec53679095325018fdddc442080b63f8912 Mon Sep 17 00:00:00 2001 From: Michael Miller Date: Thu, 1 Aug 2019 15:22:45 -0600 Subject: [PATCH] Should capture a block instead of a value --- src/spectator/dsl/example_dsl.cr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/spectator/dsl/example_dsl.cr b/src/spectator/dsl/example_dsl.cr index 611c3fb..945c209 100644 --- a/src/spectator/dsl/example_dsl.cr +++ b/src/spectator/dsl/example_dsl.cr @@ -70,11 +70,11 @@ module Spectator::DSL # The raw block can't be used because it's not clear to the user. {% method_name = block.body.id.split('.')[1..-1].join('.') %} %partial = %proc.partial(subject) - block_actual = ::Spectator::Expectations::ActualValue.new({{"#" + method_name}}, %partial) + block_actual = ::Spectator::Expectations::ActualBlock.new({{"#" + method_name}}, %partial) {% else %} # In this case, it looks like the short-hand method syntax wasn't used. # Just drop in the proc as-is. - block_actual = ::Spectator::Expectations::ActualValue.new({{"`" + block.body.stringify + "`"}}, %proc) + block_actual = ::Spectator::Expectations::ActualBlock.new({{"`" + block.body.stringify + "`"}}, %proc) {% end %} source = ::Spectator::Source.new({{_source_file}}, {{_source_line}})