Sha256: d5be54e2115587cb1250e9ef6e16ef9b9216d406f5bebcc5032e8b4b1fe063ca

Contents?: true

Size: 360 Bytes

Versions: 8

Compression:

Stored size: 360 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.

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

  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
assert-0.7.1 lib/assert/macro.rb
assert-0.7.0 lib/assert/macro.rb
assert-0.6.0 lib/assert/macro.rb
assert-0.5.0 lib/assert/macro.rb
assert-0.4.0 lib/assert/macro.rb
assert-0.3.0 lib/assert/macro.rb
assert-0.2.1 lib/assert/macro.rb
assert-0.2.0 lib/assert/macro.rb