Module: AE::Must
- Included in:
- Object
- Defined in:
- lib/ae/must.rb
Overview
Must
"It is not enough to succeed. Others must fail."
--Gore Vidal (1925 - )
THIS IS AN OPTIONAL LIBRARY.
Instance Method Summary collapse
-
#must(*args, &block) ⇒ Object
The #must method is functionaly the same as #should.
-
#must!(*args, &block) ⇒ Object
(also: #wont)
Designate a negated expectation via a functor.
-
#must=(cmp) ⇒ Object
Same as ‘object.must == other’.
Instance Method Details
#must(*args, &block) ⇒ Object
The #must method is functionaly the same as #should.
4.must == 3 #=> Assertion Error
4.must do
self == 4
end
21 22 23 |
# File 'lib/ae/must.rb', line 21 def must(*args, &block) Assertor.new(self, :backtrace=>caller).be(*args, &block) end |