Class: Object

Inherits:
BasicObject
Includes:
Assit::Assertions
Defined in:
lib/assit/setup_assertions.rb,
lib/assit/disable_assertions.rb

Overview

This disables all assertions by providing a “nop” operation for each assertion that is defined

Instance Method Summary collapse

Methods included from Assit::Assertions

#assit_block, #assit_equal, #assit_fail, #assit_kind_of, #assit_not_nil, #assit_quack, #assit_real_string

Instance Method Details

#assit(*params, &block) ⇒ Object

The base assertion is the NOP



6
7
8
9
10
# File 'lib/assit/setup_assertions.rb', line 6

def assit(bool, message = "Assertion failed.")
  unless(bool)
    AssitConfig::action.assert_it(message)
  end
end