module Spectator::DSL::Concise
Overview
DSL methods and macros for shorter syntax.
Direct including types
Defined in:
spectator/dsl/concise.crMacro Summary
-
given(*assignments, **kwargs, &block)
Defines an example and input values in a shorter syntax.
DEPRECATED Use
provided
instead. -
provided(*assignments, it description = nil, **kwargs, &block)
Defines an example and input values in a shorter syntax.
Macro Detail
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 assignments 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.
provided x = 42, y: 123 do
expect(x).to eq(42)
expect(y).to eq(123)
end
DEPRECATED Use provided
instead.
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 assignments 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.
provided x = 42, y: 123 do
expect(x).to eq(42)
expect(y).to eq(123)
end