From 96a79898156c3c7a4da2202b0b30d1c150922084 Mon Sep 17 00:00:00 2001 From: Michael Miller Date: Sat, 26 Sep 2020 18:14:41 -0600 Subject: [PATCH] Remove unreferenced code --- src/spectator/dsl/examples.cr | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/src/spectator/dsl/examples.cr b/src/spectator/dsl/examples.cr index beb07b6..fa7c0d0 100644 --- a/src/spectator/dsl/examples.cr +++ b/src/spectator/dsl/examples.cr @@ -24,32 +24,6 @@ module Spectator::DSL define_example :specify end - macro it(description = nil, _source_file = __FILE__, _source_line = __LINE__, &block) - {% if block.is_a?(Nop) %} - {% if description.is_a?(Call) %} - def %run - {{description}} - end - {% else %} - {% raise "Unrecognized syntax: `it #{description}` at #{_source_file}:#{_source_line}" %} - {% end %} - {% else %} - def %run - {{block.body}} - end - {% end %} - - %source = ::Spectator::Source.new({{_source_file}}, {{_source_line}}) - ::Spectator::SpecBuilder.add_example( - {{description.is_a?(StringLiteral) || description.is_a?(StringInterpolation) || description.is_a?(NilLiteral) ? description : description.stringify}}, - %source, - {{@type.name}} - ) { |test| test.as({{@type.name}}).%run } - end - - macro specify(description = nil, &block) - it({{description}}) {{block}} - end macro pending(description = nil, _source_file = __FILE__, _source_line = __LINE__, &block) {% if block.is_a?(Nop) %}