Adam Lindberg [Mon, 27 Nov 2017 11:57:31 +0000 (12:57 +0100)]
Version 0.8.9
Miika-Petteri Matikainen [Tue, 21 Nov 2017 06:56:46 +0000 (08:56 +0200)]
Support running meck with modules built with '+deterministic' compile option
When modules are built with '+deterministic' option, the BEAM files
don't have compile options available in the module_info/1:
$ cat foo.erl
-module(foo).
$ erlc foo.erl
$ erl -noshell -eval 'io:format("~p~n", [foo:module_info(compile)])' -run init stop
[{options,[]},
{version,"7.1.1"},
{source,"/home/foobar/foo.erl"}]
$ rm foo.beam
$ erlc +deterministic foo.erl
$ erl -noshell -eval 'io:format("~p~n", [foo:module_info(compile)])' -run init stop
[{version,"7.1.1"}]
Running meck against these modules fail:
::{function_clause,[{lists,'-filter/2-lc$^0/1-0-',
[undefined],
[{file,"lists.erl"},{line,1286}]},
{meck_proc,backup_original,3,
[{file,"/home/foobar/meck/_build/default/lib/meck/src/meck_proc.erl"},
{line,361}]},
{meck_proc,init,1,
[{file,"/home/foobar/meck/_build/default/lib/meck/src/meck_proc.erl"},
{line,206}]},
{gen_server,init_it,2,
[{file,"gen_server.erl"},{line,365}]},
{gen_server,init_it,6,[{file,[...]},{line,...}]},
{proc_lib,init_p_do_apply,3,[{file,...},{...}]}]}
This commit fixes the problem.
Fixes https://github.com/eproxus/meck/issues/184
Peter Lemenkov [Wed, 27 Sep 2017 14:04:42 +0000 (14:04 +0000)]
Fix for Rebar 2.x.y on secondary arches
Erlang + Eunit + Rebar2 behaves differently on secondary arches (mips,
sh4, powerpc, and likely other BigEndian ones). Apparently we need to
specify setup and teardown procedures explicitly instead of copying
meck:new(...) followed by meck:unload() in every test of a suite. Don't
know why, but doing this won't hurt.
I cannot reproduce this issue with Rebar3.
Fixes #105.
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Adam Lindberg [Thu, 7 Sep 2017 08:23:54 +0000 (10:23 +0200)]
Update README.md
Adam Lindberg [Thu, 7 Sep 2017 08:21:00 +0000 (10:21 +0200)]
Update for latest version and Rebar 3
Adam Lindberg [Tue, 29 Aug 2017 12:30:30 +0000 (14:30 +0200)]
Update copyright notices
Adam Lindberg [Tue, 29 Aug 2017 12:15:01 +0000 (14:15 +0200)]
Update Changelog for version 0.8.8
Adam Lindberg [Tue, 29 Aug 2017 12:10:10 +0000 (14:10 +0200)]
Version 0.8.8
Eric Entin [Tue, 25 Jul 2017 14:46:16 +0000 (10:46 -0400)]
Always add debug_info to compile opts for mocks
Adam Lindberg [Thu, 29 Jun 2017 13:21:34 +0000 (15:21 +0200)]
Publish docs to Hex when releasing
Adam Lindberg [Thu, 29 Jun 2017 13:13:58 +0000 (15:13 +0200)]
Fixes to publish script
Adam Lindberg [Thu, 29 Jun 2017 13:13:13 +0000 (15:13 +0200)]
Update Changelog for version 0.8.7
Adam Lindberg [Thu, 29 Jun 2017 13:10:43 +0000 (15:10 +0200)]
Fix syntax error in .app.src
Adam Lindberg [Thu, 29 Jun 2017 13:09:00 +0000 (15:09 +0200)]
Version 0.8.7
Adam Lindberg [Thu, 29 Jun 2017 13:06:15 +0000 (15:06 +0200)]
Update publish script
Adam Lindberg [Thu, 29 Jun 2017 12:58:00 +0000 (14:58 +0200)]
Add Changelog to Hex.pm links
Adam Lindberg [Thu, 29 Jun 2017 12:47:18 +0000 (14:47 +0200)]
Update Hex package information for Rebar 3
Adam Lindberg [Thu, 29 Jun 2017 12:38:31 +0000 (14:38 +0200)]
Add GitHub Changelog Generator config
Adam Lindberg [Thu, 29 Jun 2017 10:08:16 +0000 (12:08 +0200)]
Create new CHANGELOG.md
This is using the github_changelog_generator available at
https://github.com/skywinder/github-changelog-generator.
Adam Lindberg [Thu, 2 Feb 2017 09:02:32 +0000 (10:02 +0100)]
Migrate to Rebar 3
This change expects Meck to be built with Rebar 3 from now on. Due to it
not being compatible with Rebar 3, the optional dependency on Hamcrest
has been removed. Meck still supports matchers so it should still be
compatible, but it is no longer tested.
Adam Lindberg [Wed, 28 Jun 2017 09:31:32 +0000 (11:31 +0200)]
Version 0.8.6
Adam Lindberg [Wed, 28 Jun 2017 09:30:20 +0000 (11:30 +0200)]
Add to changelog
Adam Lindberg [Wed, 28 Jun 2017 09:29:08 +0000 (11:29 +0200)]
Update code climate
Adam Lindberg [Wed, 28 Jun 2017 09:23:01 +0000 (11:23 +0200)]
Use latest Erlang versions on Travis
Adam Lindberg [Wed, 28 Jun 2017 09:21:22 +0000 (11:21 +0200)]
Remove dialyzer attributes when creating mock
Adam Lindberg [Wed, 28 Jun 2017 09:20:54 +0000 (11:20 +0200)]
Remove usage of -compile(export_all)
Adam Lindberg [Wed, 28 Jun 2017 07:56:56 +0000 (09:56 +0200)]
Version 0.8.5
Adam Lindberg [Wed, 28 Jun 2017 07:56:06 +0000 (09:56 +0200)]
Add #176 to CHANGELOG
Andreas Schultz [Thu, 22 Jun 2017 15:37:49 +0000 (17:37 +0200)]
fix behavio(u)r attributes validation on Erlang R20
R20 now checks whether behavio(u)r attribute contains a
valid module name. The attributes content was simply take
from module_info/0. However, module_info/0 contains a list
of behavior and the attribute should only contain as single
module name.
Expand the list of behavio(u)rs into a list of attrbiutes
to make erl_lint happy.
Adam Lindberg [Thu, 4 May 2017 07:22:45 +0000 (09:22 +0200)]
Clarify additional information
Adam Lindberg [Thu, 4 May 2017 07:14:28 +0000 (09:14 +0200)]
Merge pull request #172 from marco-m/fix-capture-doc
Fix errors in capture/5, capture/6 documentation
Marco Molteni [Sat, 15 Apr 2017 16:37:14 +0000 (18:37 +0200)]
Fix errors in capture/5, capture/6 documentation
Adam Lindberg [Fri, 7 Apr 2017 14:31:48 +0000 (16:31 +0200)]
Detail edge cases of validate/1
Adam Lindberg [Mon, 13 Feb 2017 14:11:08 +0000 (15:11 +0100)]
Fix Rebar 3 link
Adam Lindberg [Mon, 13 Feb 2017 14:10:11 +0000 (15:10 +0100)]
Update Travis badge to user master branch
Adam Lindberg [Mon, 13 Feb 2017 12:18:26 +0000 (13:18 +0100)]
Add call to stacktrace when missing (fix #167)
Adam Lindberg [Thu, 2 Feb 2017 09:38:04 +0000 (10:38 +0100)]
Add TOC to README
Adam Lindberg [Thu, 2 Feb 2017 09:33:00 +0000 (10:33 +0100)]
Refresh README
Adam Lindberg [Thu, 2 Feb 2017 09:05:37 +0000 (10:05 +0100)]
Remove heading hyperlinks
John Madrid [Fri, 20 Jan 2017 18:40:21 +0000 (12:40 -0600)]
Add 19.2 to versions tested by TravisCI
Erlang 19 is the latest. Want to make sure this works for the latest OTP release.
Adam Lindberg [Thu, 22 Dec 2016 10:15:33 +0000 (11:15 +0100)]
Add contribution guidelines
amutake [Wed, 29 Jun 2016 09:13:57 +0000 (18:13 +0900)]
Add `meck_history:result/5'
`meck_history:result/5' returns the result value of a particular function
Adam Lindberg [Mon, 27 Jun 2016 11:23:14 +0000 (13:23 +0200)]
Add GitHub issue template
Adam Lindberg [Tue, 28 Jun 2016 11:39:31 +0000 (13:39 +0200)]
Merge pull request #162 from yutopp/support_passthrough_when_deleting
Fix #88
yutopp [Mon, 27 Jun 2016 09:03:14 +0000 (18:03 +0900)]
Fix #88
Adam Lindberg [Mon, 27 Jun 2016 11:15:21 +0000 (13:15 +0200)]
Add code of conduct
Adam Lindberg [Sun, 1 May 2016 17:19:37 +0000 (19:19 +0200)]
Link to Travis branches overview
Adam Lindberg [Sun, 1 May 2016 17:18:59 +0000 (19:18 +0200)]
Try bumping to Erlang 18.3 on Travis
Adam Lindberg [Sun, 1 May 2016 17:14:34 +0000 (19:14 +0200)]
Explicitly track master branch build status
Adam Lindberg [Sat, 30 Apr 2016 14:08:06 +0000 (16:08 +0200)]
Merge pull request #161 from marco-m/master
Fix eunit compile failure on Erlang 17+ (hamcrest)
Marco Molteni [Sat, 30 Apr 2016 12:32:35 +0000 (14:32 +0200)]
Fix eunit compile failure on Erlang 17+ (hamcrest)
Adam Lindberg [Sat, 27 Feb 2016 12:25:46 +0000 (13:25 +0100)]
Clean up performance tests
Adam Lindberg [Tue, 29 Dec 2015 09:54:02 +0000 (10:54 +0100)]
Time for the annual Travis Erlang version hunt
Why is there no list of supported Erlang versions on Travis?!
Adam Lindberg [Tue, 29 Dec 2015 09:46:38 +0000 (10:46 +0100)]
Make Erlang versions on Travis more up to date
Adam Lindberg [Tue, 29 Dec 2015 09:42:27 +0000 (10:42 +0100)]
Correctly add version in commit message
Adam Lindberg [Tue, 29 Dec 2015 09:41:58 +0000 (10:41 +0100)]
Use new maintainers field for Hex packages
Adam Lindberg [Tue, 29 Dec 2015 09:37:28 +0000 (10:37 +0100)]
Ignore mix build artifacts
Adam Lindberg [Tue, 29 Dec 2015 09:36:04 +0000 (10:36 +0100)]
Make namespaced types the default
This will avoid dependencies on the macro for newer Erlang versions, and
only use it for legacy compilations
Adam Lindberg [Tue, 29 Dec 2015 09:22:59 +0000 (10:22 +0100)]
Version 0.8.4
Adam Lindberg [Tue, 29 Dec 2015 09:22:07 +0000 (10:22 +0100)]
Update changelog
Adam Lindberg [Tue, 29 Dec 2015 09:18:55 +0000 (10:18 +0100)]
Depend on tools
This includes cover, which Meck assumes exists on the path.
Adam Lindberg [Mon, 9 Nov 2015 09:20:08 +0000 (10:20 +0100)]
Replace contributor list with link
Adam Lindberg [Mon, 9 Nov 2015 09:16:21 +0000 (10:16 +0100)]
Detail problems with mocking `timer`
Adam Lindberg [Mon, 9 Nov 2015 09:14:59 +0000 (10:14 +0100)]
Merge pull request #153 from edgurgel/add-merge-expects-option
Add merge_expects option
Eduardo Gurgel [Tue, 8 Sep 2015 10:14:14 +0000 (22:14 +1200)]
Add merge_expects option to meck_proc
The expectations are merged for the function/arity instead of replacing
the existing one
Adam Lindberg [Thu, 5 Nov 2015 15:01:37 +0000 (16:01 +0100)]
Add donations section
Adam Lindberg [Sat, 19 Sep 2015 10:19:07 +0000 (12:19 +0200)]
Merge pull request #156 from lilrooness/master
Update 'problematic modules list'
Joe [Thu, 17 Sep 2015 14:49:08 +0000 (15:49 +0100)]
Update 'problematic modules list'
'Problematic modules' list now includes global
Adam Lindberg [Mon, 7 Sep 2015 08:04:25 +0000 (10:04 +0200)]
Merge pull request #151 from soranoba/fix/optional_callbacks
Filter out optional_callbacks attributes
soranoba [Mon, 7 Sep 2015 06:44:10 +0000 (15:44 +0900)]
FIX: optional_callbacks (but, it isn't the best practice)
Adam Lindberg [Sat, 22 Aug 2015 12:07:29 +0000 (14:07 +0200)]
Merge pull request #150 from dszoboszlay/bug/unload-race-condition
Fix race condition between meck:unload/1 and calls to the mocked module
Dániel Szoboszlay [Thu, 20 Aug 2015 15:49:34 +0000 (17:49 +0200)]
Fix race condition between meck:unload/1 and calls to the mocked module
Dániel Szoboszlay [Wed, 19 Aug 2015 15:34:32 +0000 (17:34 +0200)]
Tests for a race condition between meck:unload/1 and calls to the mocked module
Adam Lindberg [Tue, 30 Jun 2015 10:25:51 +0000 (12:25 +0200)]
Set correct mix file
Adam Lindberg [Sat, 27 Jun 2015 11:04:22 +0000 (13:04 +0200)]
Merge pull request #145 from bpuzon/feature/local-call-caveat-doc
Document the caveat with mocking module-local calls.
bpuzon [Sat, 27 Jun 2015 03:17:24 +0000 (20:17 -0700)]
Document the caveat with mocking module-local calls.
Expectations set for a function do not apply to local invocations of that function.
This may not be obvious for first-time users
Adam Lindberg [Thu, 18 Jun 2015 15:20:15 +0000 (17:20 +0200)]
Revert "Bump Erlang version to 17.5"
This reverts commit
d0a3e5b64d3ee8aa0a2cc727632bda4071c8ac5b.
Adam Lindberg [Thu, 18 Jun 2015 14:03:56 +0000 (16:03 +0200)]
Update README.md to specify version 0.8.3
Adam Lindberg [Thu, 18 Jun 2015 13:59:11 +0000 (15:59 +0200)]
Bump Erlang version to 17.5
Adam Lindberg [Tue, 9 Jun 2015 09:54:16 +0000 (11:54 +0200)]
Update Hex.pm version
Adam Lindberg [Tue, 9 Jun 2015 09:53:56 +0000 (11:53 +0200)]
Add Hex.pm specification when tagging
Adam Lindberg [Tue, 9 Jun 2015 09:52:39 +0000 (11:52 +0200)]
Version 0.8.3
Adam Lindberg [Tue, 9 Jun 2015 09:43:22 +0000 (11:43 +0200)]
Fix type specification
Adam Lindberg [Tue, 9 Jun 2015 09:29:44 +0000 (11:29 +0200)]
Fix #114
Turns out that we can't rely on the current working directory always
staying the same. The real world scenario is when Meck is cleaning up
after the last failed test case and Rebar changes directory from the
.eunit folder to the project root. Meck now stores absolute paths to
cover backup files.
Adam Lindberg [Tue, 9 Jun 2015 09:23:20 +0000 (11:23 +0200)]
Inline import_original_cover
Adam Lindberg [Tue, 9 Jun 2015 07:35:27 +0000 (09:35 +0200)]
Adam Lindberg [Wed, 20 May 2015 07:21:57 +0000 (09:21 +0200)]
Merge pull request #143 from derek121/readme-typo
Fix typo
Derek Brown [Tue, 19 May 2015 21:30:36 +0000 (17:30 -0400)]
Fix typo
The string "An exception printed by SASL" was changed to "En exception
printed by SASL" ("An" => "En") during a reformatting of the text in
2011 via
https://github.com/eproxus/meck/commit/
51ecfb43a7193066c51352ff52acc6b4bdb81d7c#diff-04c6e90faac2675aa89e2176d2eec7d8L39
This reverts the spelling of "an".
Adam Lindberg [Wed, 8 Apr 2015 08:04:30 +0000 (10:04 +0200)]
Use 17.5 since 17.5 is not available on Travis yet
Adam Lindberg [Wed, 8 Apr 2015 08:01:12 +0000 (10:01 +0200)]
Update build environment to 17.5
Adam Lindberg [Wed, 1 Apr 2015 08:02:42 +0000 (10:02 +0200)]
Merge pull request #139 from gomoripeti/fix-cover-otp-18.0
Update for OTP 18.0
Péter Gömöri [Sat, 28 Mar 2015 22:29:08 +0000 (23:29 +0100)]
Update meck_cover for OTP 18.0
In order to avoid creating temporary files meck_cover needs direct
access to some unexported functions of cover.
In OTP 18.0 the internal API of cover changed a bit and
compile_beam/2 (which allows passing a binary instead just a filename)
was replaced by compile_beams/1.
See https://github.com/erlang/otp/commit/
ab435488
Péter Gömöri [Sat, 28 Mar 2015 21:16:48 +0000 (22:16 +0100)]
Change macro name for namespaced types
Meck used to have 'namespaced_dict' while Hamcrest recently introduced
a similar macro, 'namespaced_types' for the same purpose.
In OTP 18.0 the affected non-namespaced types were completely removed and
using them results in a compile error instead of deprecation wagning in 17.
So hamcrest.hrl relies on the precense of 'namespaced_types' macro
to use the right type. Meck's test module meck_tests.erl includes this header
so the 'namespaced_types' macro also have to be defined in meck's test.config.
To eliminate duplication I chose to unite the above two macros and
use the more generic 'namespaced_types' name.
Adam Lindberg [Mon, 30 Mar 2015 07:54:56 +0000 (09:54 +0200)]
Merge pull request #138 from gomoripeti/travis-run-tests
Run tests in travis
Péter Gömöri [Sun, 29 Mar 2015 10:01:28 +0000 (12:01 +0200)]
Run tests in travis
Running tests was removed from make target all in
https://github.com/eproxus/meck/commit/
30a116a7
Adam Lindberg [Mon, 2 Feb 2015 12:50:11 +0000 (13:50 +0100)]
Document problematic modules
Fix #135, fix #59
Adam Lindberg [Tue, 2 Dec 2014 10:05:31 +0000 (11:05 +0100)]
Update Rebar example to use version 0.8.2
Adam Lindberg [Tue, 2 Dec 2014 09:59:46 +0000 (10:59 +0100)]
Update code climate badge to 17.3
Adam Lindberg [Tue, 2 Dec 2014 09:57:47 +0000 (10:57 +0100)]
Remove old version of R16B
Adam Lindberg [Tue, 2 Dec 2014 09:55:50 +0000 (10:55 +0100)]
Add Erlang 17.1 and 17.3 to build targets list