Method: Funit::Assertions#istrue

Defined in:
lib/funit/assertions.rb

#istrue(line) ⇒ Object



44
45
46
47
48
49
50
51
# File 'lib/funit/assertions.rb', line 44

def istrue(line)
  line.match(/\((.+)\)/)
  @type = 'IsTrue'
  @condition = ".not.(#$1)"
  @message = "\"#$1 is not true\""
  syntaxError("invalid body for #@type",@suiteName) unless $1=~/\S+/
  writeAssert
end