Sha256: a5701bd2b2517d3aa7a37b5fd56fc3564725af719e215f15d72655cd956045c9

Contents?: true

Size: 624 Bytes

Versions: 3

Compression:

Stored size: 624 Bytes

Contents

# Expiremental Concept

#
class TrueClass
  # Assert true.
  #
  #   (x == y).true!
  #
  def true!(msg=nil)
    true
  end
  # Assert false.
  #
  #   (x == y).false!
  #
  def false!(err="not false")
    if Exception === err
      fail err
    else
      fail Assertion.new(err.to_s, :backtrace=>caller)
    end
  end
end

class FalseClass
  # Assert true.
  #
  #   (x == y).true!
  #
  def true!(err="not true")
    if Exception === err
      fail err
    else
      fail Assertion.new(err.to_s, :backtrace=>caller)
    end
  end
  # Assert false.
  #
  #   (x == y).false!
  #
  def false!(msg=nil)
    true
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ae-1.7.0 lib/ae/dot.rb
ae-1.6.1 lib/ae/dot.rb
ae-1.6.0 lib/ae/dot.rb