This repository was archived by the owner on Jan 17, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -144,13 +144,16 @@ - (void)testGestureRecognizerAddedAndRemovedFromSuperview
144144
145145 HUBComponentMock * const component = [HUBComponentMock new ];
146146 id <HUBComponentModel> const model = [self componentModelWithIdentifier: @" model" ];
147- HUBComponentWrapper *componentWrapper = [self componentWrapperForComponent: component model: model];
148- [componentWrapper viewDidMoveToSuperview: superview];
147+
148+ @autoreleasepool {
149+ HUBComponentWrapper *componentWrapper = [self componentWrapperForComponent: component model: model];
150+ [componentWrapper viewDidMoveToSuperview: superview];
149151
150- XCTAssertEqualObjects (superview.gestureRecognizers , @[self .gestureRecognizer]);
152+ XCTAssertEqualObjects (superview.gestureRecognizers , @[self .gestureRecognizer]);
151153
152- // When a component wrapper is deallocated, the gesture recognizer for it should automatically be removed
153- componentWrapper = nil ;
154+ // When a component wrapper is deallocated, the gesture recognizer for it should automatically be removed
155+ componentWrapper = nil ;
156+ }
154157 XCTAssertEqualObjects (superview.gestureRecognizers , @[]);
155158}
156159
You can’t perform that action at this time.
0 commit comments