Skip to content

Commit 5a03f39

Browse files
committed
updated README.md by changing StaticFunction to ClassFunction
1 parent 7c5b92e commit 5a03f39

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class StringService {
8787

8888
// The Fake Class (If the fake is from a class then `override` will be required for each function and property)
8989
class FakeStringService: StringService, Spryable {
90-
enum StaticFunction: String, StringRepresentable { // <-- **REQUIRED**
90+
enum ClassFunction: String, StringRepresentable { // <-- **REQUIRED**
9191
case giveMeAString = "giveMeAString(arg1:arg2:)"
9292
}
9393

@@ -147,7 +147,7 @@ protocol StringService: class {
147147
func giveMeAString() -> String
148148
func hereAreTwoStrings(string1: String, string2: String) -> Bool
149149
func iHaveACompletionClosure(string: String, completion: () -> Void)
150-
static func imAStaticFunction()
150+
static func imAClassFunction()
151151
}
152152

153153
// The Real Thing can be a class
@@ -172,15 +172,15 @@ class StringService {
172172
// do real things
173173
}
174174

175-
static func imAStaticFunction() {
175+
static func imAClassFunction() {
176176
// do real things
177177
}
178178
}
179179

180180
// The Stub Class (If the fake is from a class then `override` will be required for each function and property)
181181
class FakeStringService: StringService, Stubbable {
182-
enum StaticFunction: String, StringRepresentable { // <-- **REQUIRED**
183-
case imAStaticFunction = "imAStaticFunction()"
182+
enum ClassFunction: String, StringRepresentable { // <-- **REQUIRED**
183+
case imAClassFunction = "imAClassFunction()"
184184
}
185185

186186
enum Function: String, StringRepresentable { // <-- **REQUIRED**
@@ -212,7 +212,7 @@ class FakeStringService: StringService, Stubbable {
212212
return stubbedValue(arguments: string, completion) // <-- **REQUIRED**
213213
}
214214

215-
static func imAStaticFunction() {
215+
static func imAClassFunction() {
216216
return stubbedValue() // <-- **REQUIRED**
217217
}
218218
}
@@ -256,7 +256,7 @@ fakeStringService.stub(.iHaveACompletionClosure).with("correct string", Argument
256256
})
257257

258258
// can stub static functions as well
259-
FakeStringService.stub(.imAStaticFunction).andReturn(Void())
259+
FakeStringService.stub(.imAClassFunction).andReturn(Void())
260260
```
261261

262262
## Spyable
@@ -284,7 +284,7 @@ protocol StringService: class {
284284
var readwriteProperty: String { set get }
285285
func giveMeAString() -> String
286286
func hereAreTwoStrings(string1: String, string2: String) -> Bool
287-
static func imAStaticFunction()
287+
static func imAClassFunction()
288288
}
289289

290290
// The Real Thing can be a class
@@ -305,15 +305,15 @@ class RealStringService: StringService {
305305
return true
306306
}
307307

308-
static func imAStaticFunction() {
308+
static func imAClassFunction() {
309309
// do real things
310310
}
311311
}
312312

313313
// The Spy Class (If the fake is from a class then `override` will be required for each function and property)
314314
class FakeStringService: StringService, Spyable {
315-
enum StaticFunction: String, StringRepresentable { // <-- **REQUIRED**
316-
case imAStaticFunction = "imAStaticFunction()"
315+
enum ClassFunction: String, StringRepresentable { // <-- **REQUIRED**
316+
case imAClassFunction = "imAClassFunction()"
317317
}
318318

319319
enum Function: String, StringRepresentable { // <-- **REQUIRED**
@@ -345,7 +345,7 @@ class FakeStringService: StringService, Spyable {
345345
return false
346346
}
347347

348-
static func imAStaticFunction() {
348+
static func imAClassFunction() {
349349
recordCall() // <-- **REQUIRED**
350350
}
351351
}

0 commit comments

Comments
 (0)