Skip to content

Commit 7008e1a

Browse files
author
Sean Henry
committed
Updates README
1 parent de77430 commit 7008e1a

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed

README.md

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Swift Mock Generator Xcode Source Editor Extension
22
![Mock Generator Icon](readme/AppIcon_256.png)
33

4-
An Xcode extension (plugin) to generate spy, stub, and dummy classes automatically.
4+
An Xcode extension (plugin) to generate [spy](#what-is-a-spy-), [stub](#what-is-a-stub-), [dummy](#what-is-a-dummy-), and [partial spy](#what-is-a-partial-spy-) classes automatically.
55

66
![Xcode mock generator](readme/XcodeMockGenerator.gif)
77

@@ -52,9 +52,10 @@ Undo is supported for Xcode plugins but you're safer to use a version control sy
5252
| Feature | Supported |
5353
|---|---|
5454
| Swift 3 and 4.||
55-
| Generate and regenerate a spy.||
56-
| Generate and regenerate a stub.||
57-
| Generate and regenerate a dummy.||
55+
| Generate a spy.||
56+
| Generate a stub.||
57+
| Generate a dummy.||
58+
| Generate a partial spy.||
5859
| **Classes and protocols** |
5960
| Generates test doubles conforming to one or many protocols.||
6061
| Generates test doubles conforming to a class.|\*|
@@ -200,6 +201,22 @@ func test_spyCanCallClosure_withStubbedValue() {
200201
}
201202
```
202203

204+
## What is a spy?
205+
206+
Spies are stubs that also record some information based on how they were called. One form of this might be an email service that records how many messages it was sent. [See reference](https://martinfowler.com/bliki/TestDouble.html)
207+
208+
## What is a stub?
209+
210+
Stubs provide canned answers to calls made during the test, usually not responding at all to anything outside what's programmed in for the test. [See reference](https://martinfowler.com/bliki/TestDouble.html)
211+
212+
## What is a dummy?
213+
214+
Dummy objects are passed around but never actually used. Usually they are just used to fill parameter lists. [See reference](https://martinfowler.com/bliki/TestDouble.html)
215+
216+
## What is a partial spy?
217+
218+
Partial spies are spies which can also forward calls to the original implementation.
219+
203220
## Disable or remove the plugin
204221

205222
To disable:

0 commit comments

Comments
 (0)