From c18d9c4ffde535bc0db8928df46eb8334eae2ecd Mon Sep 17 00:00:00 2001 From: Michael Miller Date: Fri, 5 Apr 2019 18:38:57 -0600 Subject: [PATCH] Allow top-level context macro --- src/spectator.cr | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/spectator.cr b/src/spectator.cr index b11eef7..c00c080 100644 --- a/src/spectator.cr +++ b/src/spectator.cr @@ -47,6 +47,11 @@ module Spectator end end + # ditto + macro context(what, &block) + describe({{what}}) {{block}} + end + # Flag indicating whether Spectator should automatically run tests. # This should be left alone (set to true) in typical usage. # There are times when Spectator shouldn't run tests.