Class: Assert::Macro
- Inherits:
-
Proc
- Object
- Proc
- Assert::Macro
- Defined in:
- lib/assert/macro.rb
Instance Method Summary collapse
-
#initialize(*args, &block) ⇒ Macro
constructor
this class is essentially a way to define a custom set of tests using arguments.
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.
8 9 10 11 |
# File 'lib/assert/macro.rb', line 8 def initialize(*args, &block) raise ArgumentError unless block_given? super() end |