Class: Whitestone::Assertion::Nil
- Defined in:
- lib/whitestone/assertion_classes.rb
Overview
class Assertion::False
Instance Method Summary collapse
-
#initialize(mode, *args, &block) ⇒ Nil
constructor
A new instance of Nil.
- #message ⇒ Object
- #run ⇒ Object
Methods inherited from Base
Methods included from Guards
#args_or_block_one_only, #block_required, #no_block_allowed, #one_argument, #two_arguments, #two_or_three_arguments, #type_check
Constructor Details
#initialize(mode, *args, &block) ⇒ Nil
Returns a new instance of Nil.
154 155 156 157 |
# File 'lib/whitestone/assertion_classes.rb', line 154 def initialize(mode, *args, &block) super @test_lambda = args_or_block_one_only(args, block) end |
Instance Method Details
#message ⇒ Object
161 162 163 164 165 166 167 |
# File 'lib/whitestone/assertion_classes.rb', line 161 def msg = Col['Condition expected NOT to be nil'].yb case @mode when :assert then msg.sub(' NOT', '') when :negate then msg end end |