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

never_expect counts as a pass when a mock is never called #173

Merged

Conversation

joaopapereira
Copy link
Contributor

Add the ability to count never_expect assertions as a passing test when the mocked function is never called.
Due to current implementation a new field in RecordedExpectation struct was added to ensure that a expectation that will be always present knows if it as been triggered.

Add some tests for scenarios where never_expect is called when a expect or always_expect is already present.

Fixes #165

@coveralls
Copy link

coveralls commented Oct 22, 2018

Coverage Status

Coverage increased (+0.2%) to 96.288% when pulling 3d70014 on joaopapereira:never_expect-count-as-assertion into e206845 on cgreen-devs:master.

Add the ability to count `never_expect` assertions as a passing test
when the mocked function is never called.
Due to current implementation a new field in `RecordedExpectation`
struct was added to ensure that a expectation that will be always
present knows if it as been triggered.

Add some tests for scenarios where `never_expect` is called when a
`expect` or `always_expect` is already present.
@thoni56 thoni56 merged commit 3d70014 into cgreen-devs:master Dec 9, 2018
thoni56 added a commit that referenced this pull request Dec 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants