diff --git a/CHANGELOG.md b/CHANGELOG.md index 274a732..39e7631 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 2.3.2 (2024-07-03) + +- Added missing () to fix warnings + ## 2.3.1 (2019-10-10) - Fixed issue preventing module attributes to be used in assert_called macros [#34](https://github.com/appunite/mockery/pull/34) diff --git a/lib/mockery/proxy.ex b/lib/mockery/proxy.ex index 37bb415..d6df18f 100644 --- a/lib/mockery/proxy.ex +++ b/lib/mockery/proxy.ex @@ -16,7 +16,7 @@ defmodule Mockery.Proxy do Utils.push_call(mod, name, arity, args) - if {name, arity} in mod.module_info[:exports] do + if {name, arity} in mod.module_info()[:exports] do case Utils.get_mock(mod, [{name, arity}]) || Utils.get_mock(mod, name) do nil -> fallback_to_global_mock(mod, name, args, arity, by) @@ -51,7 +51,7 @@ defmodule Mockery.Proxy do defp fallback_to_global_mock(mod, name, args, arity, global_mock) do Utils.validate_global_mock!(mod, global_mock) - if {name, arity} in global_mock.module_info[:exports] do + if {name, arity} in global_mock.module_info()[:exports] do apply(global_mock, name, args) else fallback_to_original(mod, name, args) diff --git a/lib/mockery/utils.ex b/lib/mockery/utils.ex index 48320a4..6997f73 100644 --- a/lib/mockery/utils.ex +++ b/lib/mockery/utils.ex @@ -45,8 +45,8 @@ defmodule Mockery.Utils do # Global mock cannot export function that the original module # does not export def validate_global_mock!(original, mock) do - original_exports = original.module_info[:exports] - mock_exports = mock.module_info[:exports] -- [__info__: 1] + original_exports = original.module_info()[:exports] + mock_exports = mock.module_info()[:exports] -- [__info__: 1] case Enum.reject(mock_exports, &(&1 in original_exports)) do [] -> diff --git a/mix.exs b/mix.exs index 1f30d5d..34f2f39 100644 --- a/mix.exs +++ b/mix.exs @@ -1,7 +1,7 @@ defmodule Mockery.Mixfile do use Mix.Project - @version "2.3.1" + @version "2.3.2" def project do [