Class: Assertion::False

Inherits:
True show all
Defined in:
lib/quarry/assertion.rb

Instance Method Summary collapse

Methods inherited from True

message

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Assertion::True

Instance Method Details

#assert(assertion, msg = "failed assertion (no message given)") ⇒ Object

Raises:



85
86
87
# File 'lib/quarry/assertion.rb', line 85

def assert(assertion, msg="failed assertion (no message given)")
  raise Assertion, msg if assertion
end

#message(obj, sym, *a, &b) ⇒ Object



89
90
91
# File 'lib/quarry/assertion.rb', line 89

def message( obj, sym, *a, &b )
  "#{obj.inspect} should not #{sym} #{a.collect{|x| x.inspect}.join(',')}"
end