From b8dc83286c3e8eaa0875cd0d45e6f083eee3a2f2 Mon Sep 17 00:00:00 2001 From: Michael Miller Date: Sun, 8 Nov 2020 16:52:08 -0700 Subject: [PATCH] Upcast context to reduce method instances generated by compiler --- src/spectator/dsl/examples.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/spectator/dsl/examples.cr b/src/spectator/dsl/examples.cr index 7b246bc..85c63b1 100644 --- a/src/spectator/dsl/examples.cr +++ b/src/spectator/dsl/examples.cr @@ -19,8 +19,8 @@ module Spectator::DSL ::Spectator::DSL::Builder.add_example( _spectator_example_name(\{{what}}), ::Spectator::Source.new(\{{block.filename}}, \{{block.line_number}}), - \{{@type.name}}.new ) { |example, context| context.as(\{{@type.name}}).\%test } + \{{@type.name}}.new.as(::Spectator::Context) end end