Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add merge_expects option to meck_proc #153

Merged
merged 1 commit into from
Nov 9, 2015
Merged

Add merge_expects option to meck_proc #153

merged 1 commit into from
Nov 9, 2015

Conversation

edgurgel
Copy link
Contributor

@edgurgel edgurgel commented Sep 8, 2015

The expectations are merged for the function/arity instead of replacing the existing one

This is my first try to add the feature proposed at #152.

I added really basic tests to ensure some of the existing expectations are being handled as expected (no pun intended).

Should I add more tests for some specific cases? Is merge_expects a good option name?

@eproxus
Copy link
Owner

eproxus commented Nov 5, 2015

Sorry for not getting back to you earlier! Code looks nice and simple!

Can you also add a description of the option to the EDoc documentation?

@edgurgel
Copy link
Contributor Author

edgurgel commented Nov 8, 2015

Done! I accept suggestions for a better description :)

@eproxus
Copy link
Owner

eproxus commented Nov 9, 2015

How about this?

The expectations for the function/arity signature are merged whith existing ones instead of replacing all of them each time an expectation is added. Expectations are added to the end of the function clause list, meaning that pattern matching will be performed in the order the expectations were added.

The expectations are merged for the function/arity instead of replacing
the existing one
@edgurgel
Copy link
Contributor Author

edgurgel commented Nov 9, 2015

Done!

eproxus added a commit that referenced this pull request Nov 9, 2015
@eproxus eproxus merged commit b80f342 into eproxus:master Nov 9, 2015
@eproxus
Copy link
Owner

eproxus commented Nov 9, 2015

Thank you!

@edgurgel
Copy link
Contributor Author

edgurgel commented Nov 9, 2015

Thank you! 🎉

@edgurgel edgurgel deleted the add-merge-expects-option branch November 9, 2015 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants