File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed
Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -18,13 +18,20 @@ defmodule ExceptionTest do
1818 end
1919 end
2020
21- assert Exception . message ( % { __struct__: BadException , __exception__: true , raise: true } ) =~
22- "got RuntimeError with message \" oops \" while retrieving Exception.message/1 " <>
23- "for %{__exception__: true, __struct__: ExceptionTest.BadException , raise: true}"
21+ assert "got RuntimeError with message \" oops \" while retrieving Exception.message/1 for %{" <>
22+ inspected =
23+ Exception . message ( % { __struct__: BadException , __exception__: true , raise: true } )
2424
25- assert Exception . message ( % { __struct__: BadException , __exception__: true , raise: false } ) =~
26- "got nil while retrieving Exception.message/1 " <>
27- "for %{__exception__: true, __struct__: ExceptionTest.BadException, raise: false}"
25+ assert inspected =~ "raise: true"
26+ assert inspected =~ "__exception__: true"
27+ assert inspected =~ "__struct__: ExceptionTest.BadException"
28+
29+ assert "got nil while retrieving Exception.message/1 for %{" <> inspected =
30+ Exception . message ( % { __struct__: BadException , __exception__: true , raise: false } )
31+
32+ assert inspected =~ "raise: false"
33+ assert inspected =~ "__exception__: true"
34+ assert inspected =~ "__struct__: ExceptionTest.BadException"
2835 end
2936
3037 test "normalize/2" do
You can’t perform that action at this time.
0 commit comments