@@ -18,7 +18,7 @@ private func waitForOperation<T>(fromProducer producer: SignalProducer<Operation
18
18
onDelete: Int -> ( ) = { fail ( " Invalid operation type: .Delete( \( $0) ) " ) } ) {
19
19
20
20
waitUntil { done in
21
- producer. start ( next : { operation in
21
+ producer. startWithNext { operation in
22
22
switch operation {
23
23
case . Append( let value) :
24
24
onAppend ( value)
@@ -28,7 +28,7 @@ private func waitForOperation<T>(fromProducer producer: SignalProducer<Operation
28
28
onDelete ( index)
29
29
}
30
30
done ( )
31
- } )
31
+ }
32
32
when ( )
33
33
}
34
34
@@ -262,12 +262,12 @@ class ReactiveArraySpec: QuickSpec {
262
262
array. producer
263
263
. take ( array. count)
264
264
. collect ( )
265
- . start ( next : { operations in
265
+ . startWithNext { operations in
266
266
let expectedOperations : [ Operation < Int > ] = array. map { Operation . Append ( value: $0) }
267
267
let result = operations == expectedOperations
268
268
expect ( result) . to ( beTrue ( ) )
269
269
done ( )
270
- } )
270
+ }
271
271
}
272
272
}
273
273
@@ -390,30 +390,30 @@ class ReactiveArraySpec: QuickSpec {
390
390
391
391
beforeEach {
392
392
countBeforeOperation = array. count
393
- producer = array. observableCount. producer. skip ( 1 )
393
+ producer = array. observableCount. producer
394
394
}
395
395
396
396
it ( " returns the initial amount of elements in the array " ) {
397
- producer. start ( next : { count in
397
+ producer. startWithNext { count in
398
398
expect ( count) . to ( equal ( countBeforeOperation) )
399
- } )
399
+ }
400
400
}
401
401
402
402
context ( " when an insert operation is executed " ) {
403
403
404
404
beforeEach {
405
- producer = producer |> skip ( 1 )
405
+ producer = producer. skip ( 1 )
406
406
}
407
407
408
408
it ( " does not update the count " ) {
409
409
waitUntil { done in
410
410
producer
411
411
. take ( 1 )
412
412
. collect ( )
413
- . start ( next : { counts in
413
+ . startWithNext { counts in
414
414
expect ( counts) . to ( equal ( [ countBeforeOperation + 1 ] ) )
415
415
done ( )
416
- } )
416
+ }
417
417
418
418
array. insert ( 657 , atIndex: 1 )
419
419
array. append ( 656 )
@@ -426,15 +426,15 @@ class ReactiveArraySpec: QuickSpec {
426
426
context ( " when an append operation is executed " ) {
427
427
428
428
beforeEach {
429
- producer = producer |> skip ( 1 )
429
+ producer = producer. skip ( 1 )
430
430
}
431
431
432
432
it ( " updates the count " ) {
433
433
waitUntil { done in
434
- producer. start ( next : { count in
434
+ producer. startWithNext { count in
435
435
expect ( count) . to ( equal ( countBeforeOperation + 1 ) )
436
436
done ( )
437
- } )
437
+ }
438
438
439
439
array. append ( 656 )
440
440
}
@@ -445,15 +445,15 @@ class ReactiveArraySpec: QuickSpec {
445
445
context ( " when a delete operation is executed " ) {
446
446
447
447
beforeEach {
448
- producer = producer |> skip ( 1 )
448
+ producer = producer. skip ( 1 )
449
449
}
450
450
451
451
it ( " updates the count " ) {
452
452
waitUntil { done in
453
- producer. start ( next : { count in
453
+ producer. startWithNext { count in
454
454
expect ( count) . to ( equal ( countBeforeOperation - 1 ) )
455
455
done ( )
456
- } )
456
+ }
457
457
458
458
array. removeAtIndex ( 1 )
459
459
}
0 commit comments