Rename testing.Fake to testing.Stub. #51

Merged
merged 2 commits into from Feb 13, 2015

Conversation

Projects
None yet
2 participants
Contributor

ericsnowcurrently commented Feb 13, 2015

Gustavo pointed out that "Fake" probably isn't the right name for this kind of testing double.
Although nomenclature for testing doubles is inconsistent, I'll follow the definitions from Meszaros's xUnit book [1] as summarized by Fowler [2]:

fake: has working (but not production suitable) implementation
stub: provides canned answers and records info about calls
mock: pre-programmed with expectations about expected calls

[1] http://xunitpatterns.com/Mocks,%20Fakes,%20Stubs%20and%20Dummies.html
[2] http://martinfowler.com/articles/mocksArentStubs.html#TheDifferenceBetweenMocksAndStubs

Contributor

natefinch commented Feb 13, 2015

LGTM

ericsnowcurrently added a commit that referenced this pull request Feb 13, 2015

Merge pull request #51 from ericsnowcurrently/stub
Rename testing.Fake to testing.Stub.

@ericsnowcurrently ericsnowcurrently merged commit 5f37149 into juju:master Feb 13, 2015

@ericsnowcurrently ericsnowcurrently deleted the ericsnowcurrently:stub branch Feb 13, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment