File tree 2 files changed +8
-1
lines changed
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -854,7 +854,7 @@ - (RACSignal *)takeUntilReplacement:(RACSignal *)replacement {
854
854
- (RACSignal *)switchToLatest {
855
855
return [[RACSignal createSignal: ^(id <RACSubscriber> subscriber) {
856
856
__block BOOL outerCompleted = NO ;
857
- __block BOOL innerCompleted = NO ;
857
+ __block BOOL innerCompleted = YES ;
858
858
__block NSUInteger currentInnerIndex = 0 ;
859
859
860
860
RACSerialDisposable *innerDisposable = [[RACSerialDisposable alloc ] init ];
Original file line number Diff line number Diff line change @@ -1985,6 +1985,13 @@ + (void)configure:(Configuration *)configuration {
1985
1985
expect(@(completed)).to(beTruthy());
1986
1986
});
1987
1987
1988
+ qck_it(@"should send completed when the switching signal completes and no signal is sent", ^{
1989
+ expect(@(completed)).to(beFalsy());
1990
+
1991
+ [subject sendCompleted];
1992
+ expect(@(completed)).to(beTruthy());
1993
+ });
1994
+
1988
1995
qck_it(@"should dispose previous inner signal before subscribing to new inner signal", ^{
1989
1996
RACSubject *otherSignal = [RACSubject subject];
1990
1997
RACSignal *signal = [RACSignal createSignal:^RACDisposable *(id<RACSubscriber> subscriber) {
You can’t perform that action at this time.
0 commit comments