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

Issue #28 and #21 mock method arguments #77

Merged
merged 7 commits into from
Oct 20, 2020

Conversation

crookse
Copy link
Member

@crookse crookse commented Oct 20, 2020

Fixes #28 and #21.

Description

  • adds mock.methods.{someMethod}.wasLastCalledWith([arg1, arg2, etc.])
  • adds mock.methods.{someMethod}.wasCalledTimes(numberOfTimes)
  • adds mock.methods.{someMethod}.lastReturned(returnValue)
  • removes mock.calls.{someMethod}

See the test file for examples of how they work.

@crookse crookse changed the title Issue #28 mock method arguments Issue #21 mock method arguments Oct 20, 2020
@crookse crookse changed the title Issue #21 mock method arguments Issue #28 and #21 mock method arguments Oct 20, 2020
@ebebbington
Copy link
Member

this PR ready for review?

@crookse
Copy link
Member Author

crookse commented Oct 20, 2020

this PR ready for review?

yesSirz

Copy link
Member

@ebebbington ebebbington left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@crookse crookse merged commit 9bc6ffe into rhum-cli Oct 20, 2020
@crookse crookse deleted the issue-#28-mock-function-arguments branch October 20, 2020 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants