lib/ae/dot.rb in ae-1.5.0 vs lib/ae/dot.rb in ae-1.6.0

- old
+ new

@@ -1,21 +1,45 @@ # Expiremental Concept +# class TrueClass - def true + # Assert true. + # + # (x == y).true! + # + def true!(msg=nil) true end - def false - fail Assertion.new('true', :backtrace=>caller) - #raise Assertion + # 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 - def true - fail Assertion.new('false', :backtrace=>caller) + # 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 - def false + # Assert false. + # + # (x == y).false! + # + def false!(msg=nil) true end end