Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
I'm finally making two-stage object creation work for me ;-)
#import <SenTestingKit/SenTestingKit.h>
#import "OCMock.h"
#import "NLPageControlScrollViewHelper.h"
#pragma mark - Tests
@interface NLPageControlScrollViewHelperTests : SenTestCase
@implementation NLPageControlScrollViewHelperTests
- (void)testSetSelfAsScrollViewDelegate
id mockScrollView = [OCMockObject niceMockForClass:[UIScrollView class]];
// alloc
NLPageControlScrollViewHelper *helper = [NLPageControlScrollViewHelper alloc];
[[mockScrollView expect] setDelegate:helper];
// then init
helper = [helper initWithPageControl:nil scrollView:mockScrollView];
[mockScrollView verify];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.