From 546a0db392a07b9363d440ebab33faf9e7352be8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Tue, 24 Dec 2024 09:41:34 +0100 Subject: [PATCH] Use division by zero to show exception Closes #14111. --- lib/ex_unit/lib/ex_unit/assertions.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ex_unit/lib/ex_unit/assertions.ex b/lib/ex_unit/lib/ex_unit/assertions.ex index ba119f1057b..22b1a790e57 100644 --- a/lib/ex_unit/lib/ex_unit/assertions.ex +++ b/lib/ex_unit/lib/ex_unit/assertions.ex @@ -786,7 +786,7 @@ defmodule ExUnit.Assertions do ## Examples assert_raise ArithmeticError, "bad argument in arithmetic expression", fn -> - 1 + "test" + 1 / 0 end assert_raise RuntimeError, ~r/^today's lucky number is 0\.\d+!$/, fn ->