Skip to content

Commit c4654de

Browse files
authored
Improve spec for ExUnit.CaptureLog.with_log/2 (#12409)
1 parent 0fb7692 commit c4654de

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/ex_unit/lib/ex_unit/capture_log.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ defmodule ExUnit.CaptureLog do
9595
assert log =~ "log msg"
9696
"""
9797
@doc since: "1.13.0"
98-
@spec with_log(keyword, (-> any)) :: {any, String.t()}
99-
def with_log(opts \\ [], fun) do
98+
@spec with_log(keyword, (-> result)) :: {result, String.t()} when result: any
99+
def with_log(opts \\ [], fun) when is_list(opts) do
100100
opts = Keyword.put_new(opts, :level, nil)
101101
{:ok, string_io} = StringIO.open("")
102102

0 commit comments

Comments
 (0)