Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Rename testing.Fake to testing.Stub. #51
Conversation
ericsnowcurrently
added some commits
Feb 13, 2015
|
LGTM |
added a commit
that referenced
this pull request
Feb 13, 2015
ericsnowcurrently
merged commit 5f37149
into
juju:master
Feb 13, 2015
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
ericsnowcurrently commentedFeb 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