module Spectator::DSL::Concise

Overview

DSL methods and macros for shorter syntax.

Direct including types

Defined in:

spectator/dsl/concise.cr

Macro Summary

Macro Detail

macro given(*assignments, **kwargs, &block) #

Defines an example and input values in a shorter syntax. The only arguments given to this macro are one or more assignments. The names in the assigments will be available in the example code.

If the code block is omitted, then the example is skipped (marked as not implemented).

Tags and metadata cannot be used with this macro.

given x = 42 do
  expect(x).to eq(42)
end

DEPRECATED Use provided instead.


[View source]
macro provided(*assignments, **kwargs, &block) #

Defines an example and input values in a shorter syntax. The only arguments given to this macro are one or more assignments. The names in the assigments will be available in the example code.

If the code block is omitted, then the example is skipped (marked as not implemented).

Tags and metadata cannot be used with this macro.

given x = 42 do
  expect(x).to eq(42)
end

[View source]