Class: Assert::Macro

Inherits:
Proc
  • Object
show all
Defined in:
lib/assert/macro.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args, &block) ⇒ Macro

this class is essentially a way to define a custom set of tests using arguments. When passed as an argument to the ‘should’ method, a macro will be instance_eval’d in that Assert::Context.

Raises:

  • (ArgumentError)


8
9
10
11
# File 'lib/assert/macro.rb', line 8

def initialize(*args, &block)
  raise ArgumentError unless block_given?
  super()
end