Class: FalseClass

Inherits:
Object show all
Defined in:
lib/ae/dot.rb

Instance Method Summary collapse

Instance Method Details

#false!(msg = nil) ⇒ Object

Assert false.

(x == y).false!


41
42
43
# File 'lib/ae/dot.rb', line 41

def false!(msg=nil)
  true
end

#true!(err = "not true") ⇒ Object

Assert true.

(x == y).true!


30
31
32
33
34
35
36
# File 'lib/ae/dot.rb', line 30

def true!(err="not true")
  if Exception === err
    fail err
  else
    fail Assertion.new(err.to_s, :backtrace=>caller)
  end
end