Module: AE::Detest
- Included in:
- World
- Defined in:
- lib/ae/detest.rb
Overview
Instance Method Summary collapse
-
#E(&b) ⇒ Object
Expect and error.
-
#F(x = nil, &b) ⇒ Object
Test for not.
-
#N(x = nil, &b) ⇒ Object
Test for nil?.
-
#T(x = nil, &b) ⇒ Object
Test for true.
Instance Method Details
#E(&b) ⇒ Object
Expect and error.
E { raise }
Unless #T, #F and #N, the #E method only supports block notation.
53 54 55 |
# File 'lib/ae/detest.rb', line 53 def E(&b) expect(Exception, &b) end |
#F(x = nil, &b) ⇒ Object
Test for not.
F 1 == 2
36 37 38 |
# File 'lib/ae/detest.rb', line 36 def F(x=nil, &b) Assertion.test(!(x || b.call), :backtrace=>caller) end |