module Spectator::DSL::Top

Direct including types

Defined in:

spectator/dsl/top.cr

Macro Summary

Macro Detail

macro context(description, *tags, **metadata, &block) #

Top-level describe method. All specs in a file must be wrapped in this call. This takes an argument and a block. The argument is what your spec is describing. It can be any Crystal expression, but is typically a class name or feature string. The block should contain all of the examples for what is being described.

Example:

Spectator.describe Foo do
  # Your examples for `Foo` go here.
end

Tags can be specified by adding symbols (keywords) after the first argument. Key-value pairs can also be specified.

NOTE Inside the block, the Spectator prefix should not be used.


[View source]
macro describe(description, *tags, **metadata, &block) #

Top-level describe method. All specs in a file must be wrapped in this call. This takes an argument and a block. The argument is what your spec is describing. It can be any Crystal expression, but is typically a class name or feature string. The block should contain all of the examples for what is being described.

Example:

Spectator.describe Foo do
  # Your examples for `Foo` go here.
end

Tags can be specified by adding symbols (keywords) after the first argument. Key-value pairs can also be specified.

NOTE Inside the block, the Spectator prefix should not be used.


[View source]
macro example_group(description, *tags, **metadata, &block) #

Top-level describe method. All specs in a file must be wrapped in this call. This takes an argument and a block. The argument is what your spec is describing. It can be any Crystal expression, but is typically a class name or feature string. The block should contain all of the examples for what is being described.

Example:

Spectator.describe Foo do
  # Your examples for `Foo` go here.
end

Tags can be specified by adding symbols (keywords) after the first argument. Key-value pairs can also be specified.

NOTE Inside the block, the Spectator prefix should not be used.


[View source]