lib/mini_sanity/error.rb in mini_sanity-1.0.0 vs lib/mini_sanity/error.rb in mini_sanity-1.1.0
- old
+ new
@@ -1,9 +1,18 @@
class MiniSanity::Error < RuntimeError
+
+ def initialize(name, expected, actual)
+ super(
+ "\n#{name || "value"} violates expectations\n" \
+ " expected: #{expected}\n" \
+ " actual: #{actual}\n"
+ )
+ end
+
end