- Added
use Mockery.Macro
to solve new Elixir warnings
- Added missing () to fix warnings
- Fixed issue preventing module attributes to be used in assert_called macros #34
- Allowed multiple mocks when using pipe operator or nested calls #27
- Deprecated
Mockery.History.enable_history/1
in favor ofMockery.History.enable_history/0
andMockery.History.disable_history/0
- Added
Mockery.Macro.mockable/2
macro as alternative way to prepare module for mocking - Deprecated
Mockery.new/2
- Added
Mockery.new/2
- Fixed typo in error message #21
- Removed support for Elixir 1.1 and 1.2
- Fixed
Mockery.of/2
typespecs
- When Mix is missing,
Mockery.of/2
assumes that env is:prod
-
Removed
Mockery.Heritage
- Global mocks will be handled without macros by pure elixir modules.
- Some new restrictions have been added for global mock modules (see global mock section in README)
-
Changed
Mockery.mock/3
when value is function (dynamic mock)[function_name: arity]
syntax remains unchanged:function_name
syntax will raise error
-
Changed
Mockery.of/2
output- run
mix compile --force
when upgrading from Mockery 1.x.x
- run
Mockery.mock/2
andMockery.mock/3
are now chainable
- Minor format fix in
Mockery.History
failure messages
- Added string version for
Mockery.of/2
(now recommended) - Fixed mocking of erlang modules
- Introduced
Mockery.History
-
More descriptive errors (when args are not list) for:
Mockery.Assertions.assert_called/3
Mockery.Assertions.refute_called/3
Mockery.Assertions.assert_called/4
Mockery.Assertions.refute_called/4
-
Removed unnecessary
Elixir.
namespace from module names in error messages
- Added
Mockery.mock/2
(Mockery.mock/3
value defaults to:mocked
) - Added
Mockery.Assertions.assert_called/4
macro - Added
Mockery.Assertions.refute_called/4
macro
- Fixed issue when mocking with
nil
orfalse
- Added
use Mockery
for importing bothMockery
andMockery.Assertions
- Added
Mockery.Assertions.refute_called/2
andMockery.Assertions.refute_called/3
- Loosen elixir version requirement from
~> 1.3
to~> 1.1