-
Notifications
You must be signed in to change notification settings - Fork 0
/
MasterViewControllerSpec.m
47 lines (35 loc) · 1.16 KB
/
MasterViewControllerSpec.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//
// MasterViewControllerSpec.m
// Sample App
//
// Created by Apro on 13/07/15.
// Copyright 2015 Apro. All rights reserved.
//
#import <Specta/Specta.h>
#import <Expecta/Expecta.h>
#import "MasterViewController.h"
SpecBegin(MasterViewController)
describe(@"MasterViewController", ^{
__block MasterViewController *_masterVC;
beforeEach(^{
_masterVC = [[UIStoryboard storyboardWithName:@"Main" bundle:nil]
instantiateViewControllerWithIdentifier:@"Master"];
[_masterVC view];
});
it(@"should not be nil and should be a kind of TableViewController ", ^{
expect(_masterVC).notTo.beNil;
expect(_masterVC).to.beKindOf([UITableViewController class]);
});
context(@"on initial launch", ^{
it(@"viewModel should be nil", ^{
expect([_masterVC valueForKey:@"_viewModel"]).to.beNil;
});
it(@"should load the viewModel asynchronously", ^{
expect([_masterVC valueForKey:@"_viewModel"]).after(15).beInstanceOf([NSArray class]);
});
});
afterEach(^{
_masterVC = nil;
});
});
SpecEnd