Module: AE::Must
- Included in:
- Object
- Defined in:
- lib/ae/must.rb
Overview
Note:
THIS IS AN OPTIONAL LIBRARY.
Must
"It is not enough to succeed. Others must fail."
--Gore Vidal (1925 - )
Instance Method Summary collapse
-
#must(*args, &block) ⇒ Assertor
The #must method is functionaly the same as #should.
-
#must!(*args, &block) ⇒ Assertor
(also: #wont, #must_not, #mustnt)
Designate a negated expectation via a functor.
-
#must=(cmp) ⇒ Assertor
Same as ‘object.must == other’.
Instance Method Details
#must(*args, &block) ⇒ Assertor
The #must method is functionaly the same as #should.
22 23 24 |
# File 'lib/ae/must.rb', line 22 def must(*args, &block) Assertor.new(self, :backtrace=>caller).be(*args, &block) end |
#must!(*args, &block) ⇒ Assertor Also known as: wont, must_not, mustnt
Designate a negated expectation via a functor. Read this as “must not”.
40 41 42 |
# File 'lib/ae/must.rb', line 40 def must!(*args, &block) Assertor.new(self, :backtrace=>caller).not.be(*args, &block) end |
#must=(cmp) ⇒ Assertor
Same as ‘object.must == other’.
29 30 31 |
# File 'lib/ae/must.rb', line 29 def must=(cmp) Assertor.new(self, :backtrace=>caller) == cmp end |