Module: TestRocket

Extended by:
Out
Defined in:
lib/testrocket.rb

Defined Under Namespace

Modules: Out

Instance Attribute Summary

Attributes included from Out

#out

Instance Method Summary collapse

Instance Method Details

#+@Object



8
# File 'lib/testrocket.rb', line 8

def +@; r = _test :_pass, :_fail; (TestRocket.out || $>).puts r; r end

#-@Object



9
# File 'lib/testrocket.rb', line 9

def -@; r = _test :_fail, :_pass; (TestRocket.out || $>).puts r; r end

#_failObject



12
# File 'lib/testrocket.rb', line 12

def _fail; "FAIL @ #{source_location.join(':')}"; end

#_passObject



11
# File 'lib/testrocket.rb', line 11

def _pass; '  OK'; end

#_test(a, b) ⇒ Object



4
5
6
# File 'lib/testrocket.rb', line 4

def _test(a, b)
  send((call rescue()) ? a : b)
end