Exception: MiniSanity::Error

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/mini_sanity/error.rb

Instance Method Summary collapse

Constructor Details

#initialize(name, expected, actual) ⇒ Error

Returns a new instance of Error.



3
4
5
6
7
8
9
# File 'lib/mini_sanity/error.rb', line 3

def initialize(name, expected, actual)
  super(
    "\n#{name || "value"} violates expectations\n" \
    "  expected: #{expected}\n" \
    "  actual: #{actual}\n"
  )
end