We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0fb7692 commit c4654deCopy full SHA for c4654de
lib/ex_unit/lib/ex_unit/capture_log.ex
@@ -95,8 +95,8 @@ defmodule ExUnit.CaptureLog do
95
assert log =~ "log msg"
96
"""
97
@doc since: "1.13.0"
98
- @spec with_log(keyword, (-> any)) :: {any, String.t()}
99
- def with_log(opts \\ [], fun) do
+ @spec with_log(keyword, (-> result)) :: {result, String.t()} when result: any
+ def with_log(opts \\ [], fun) when is_list(opts) do
100
opts = Keyword.put_new(opts, :level, nil)
101
{:ok, string_io} = StringIO.open("")
102
0 commit comments