module

Spectator::DSL::Concise

DSL methods and macros for shorter syntax.

Macros

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 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
Source
provided(*assignments, it description = nil, **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 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
Source