module Insist::Assert

Public Instance Methods

assert(truthy, message) click to toggle source

Assert something is true.

This will raise Insist::Failure with the given message if the ‘truthy’ value is false.

# File lib/insist/assert.rb, line 7
def assert(truthy, message)
  raise Insist::Failure.new(message) if !truthy
end