Skip to content

Commit

Permalink
Fix deprecation warning on register_test/4 (#192)
Browse files Browse the repository at this point in the history
  • Loading branch information
sabiwara authored Feb 12, 2024
1 parent 83832e2 commit 2dbcef1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/ex_unit_properties.ex
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,8 @@ defmodule ExUnitProperties do
contents = Macro.escape(contents, unquote: true)

quote bind_quoted: [context: context, contents: contents, message: message] do
name = ExUnit.Case.register_test(__ENV__, :property, message, [:property])
%{module: mod, file: file, line: line} = __ENV__
name = ExUnit.Case.register_test(mod, file, line, :property, message, [:property])
def unquote(name)(unquote(context)), do: unquote(contents)
end
end
Expand Down

0 comments on commit 2dbcef1

Please sign in to comment.