@@ -87,7 +87,7 @@ class StringService {
87
87
88
88
// The Fake Class (If the fake is from a class then `override` will be required for each function and property)
89
89
class FakeStringService : StringService , Spryable {
90
- enum StaticFunction : String , StringRepresentable { // <-- **REQUIRED**
90
+ enum ClassFunction : String , StringRepresentable { // <-- **REQUIRED**
91
91
case giveMeAString = " giveMeAString(arg1:arg2:)"
92
92
}
93
93
@@ -147,7 +147,7 @@ protocol StringService: class {
147
147
func giveMeAString () -> String
148
148
func hereAreTwoStrings (string1 : String , string2 : String ) -> Bool
149
149
func iHaveACompletionClosure (string : String , completion : () -> Void )
150
- static func imAStaticFunction ()
150
+ static func imAClassFunction ()
151
151
}
152
152
153
153
// The Real Thing can be a class
@@ -172,15 +172,15 @@ class StringService {
172
172
// do real things
173
173
}
174
174
175
- static func imAStaticFunction () {
175
+ static func imAClassFunction () {
176
176
// do real things
177
177
}
178
178
}
179
179
180
180
// The Stub Class (If the fake is from a class then `override` will be required for each function and property)
181
181
class FakeStringService : StringService , Stubbable {
182
- enum StaticFunction : String , StringRepresentable { // <-- **REQUIRED**
183
- case imAStaticFunction = " imAStaticFunction ()"
182
+ enum ClassFunction : String , StringRepresentable { // <-- **REQUIRED**
183
+ case imAClassFunction = " imAClassFunction ()"
184
184
}
185
185
186
186
enum Function : String , StringRepresentable { // <-- **REQUIRED**
@@ -212,7 +212,7 @@ class FakeStringService: StringService, Stubbable {
212
212
return stubbedValue (arguments : string, completion) // <-- **REQUIRED**
213
213
}
214
214
215
- static func imAStaticFunction () {
215
+ static func imAClassFunction () {
216
216
return stubbedValue () // <-- **REQUIRED**
217
217
}
218
218
}
@@ -256,7 +256,7 @@ fakeStringService.stub(.iHaveACompletionClosure).with("correct string", Argument
256
256
})
257
257
258
258
// can stub static functions as well
259
- FakeStringService.stub (.imAStaticFunction ).andReturn (Void ())
259
+ FakeStringService.stub (.imAClassFunction ).andReturn (Void ())
260
260
```
261
261
262
262
## Spyable
@@ -284,7 +284,7 @@ protocol StringService: class {
284
284
var readwriteProperty: String { set get }
285
285
func giveMeAString () -> String
286
286
func hereAreTwoStrings (string1 : String , string2 : String ) -> Bool
287
- static func imAStaticFunction ()
287
+ static func imAClassFunction ()
288
288
}
289
289
290
290
// The Real Thing can be a class
@@ -305,15 +305,15 @@ class RealStringService: StringService {
305
305
return true
306
306
}
307
307
308
- static func imAStaticFunction () {
308
+ static func imAClassFunction () {
309
309
// do real things
310
310
}
311
311
}
312
312
313
313
// The Spy Class (If the fake is from a class then `override` will be required for each function and property)
314
314
class FakeStringService : StringService , Spyable {
315
- enum StaticFunction : String , StringRepresentable { // <-- **REQUIRED**
316
- case imAStaticFunction = " imAStaticFunction ()"
315
+ enum ClassFunction : String , StringRepresentable { // <-- **REQUIRED**
316
+ case imAClassFunction = " imAClassFunction ()"
317
317
}
318
318
319
319
enum Function : String , StringRepresentable { // <-- **REQUIRED**
@@ -345,7 +345,7 @@ class FakeStringService: StringService, Spyable {
345
345
return false
346
346
}
347
347
348
- static func imAStaticFunction () {
348
+ static func imAClassFunction () {
349
349
recordCall () // <-- **REQUIRED**
350
350
}
351
351
}
0 commit comments