Sha256: 98cba227d5ec1eb152eb01757082a31d9669605da321aafc27991008809b4365
Contents?: true
Size: 436 Bytes
Versions: 1
Compression:
Stored size: 436 Bytes
Contents
module Assert class Macro < ::Proc # 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. attr_accessor :name def initialize(name = nil, *args, &block) raise ArgumentError unless block_given? @name = name || "run this macro" super() end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
assert-2.17.0 | lib/assert/macro.rb |