Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

mocks should call t.Helper() #239

Closed
poy opened this issue Dec 2, 2018 · 1 comment · Fixed by #245
Closed

mocks should call t.Helper() #239

poy opened this issue Dec 2, 2018 · 1 comment · Fixed by #245

Comments

@poy
Copy link
Collaborator

poy commented Dec 2, 2018

The mocks are being flagged as a failing line during a test failure. This is due to the fact that Controller.Call(). invokes t.Helper(), but the mock does not. This means that instead of the offending line being called out, the mock is.

This could be solved by having the mock also call t.Helper().

@balshetzer
Copy link
Collaborator

Sounds good

@poy poy mentioned this issue Dec 5, 2018
@poy poy closed this as completed in #245 Dec 8, 2018
poy added a commit that referenced this issue Dec 8, 2018
Using T.Helper() better directs the callstack to point at the
offending line in the production code.

fixes #239
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants