File tree Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change 26
26
-(void )moveStepFromIndex : (NSInteger )fromIndex toIndex : (NSInteger )toIndex ;
27
27
28
28
-(BOOL )shouldShowCancelButton ;
29
+
29
30
-(NSInteger )numberOfSteps ;
30
31
-(int32_t )filmTypeForSection : (NSInteger )section ;
31
32
-(NSInteger )sectionForFilmTpe : (int32_t )filmType ;
Original file line number Diff line number Diff line change 14
14
#import " CoreDataHelpers.h"
15
15
16
16
#import " ASHEditRecipeViewModel.h"
17
+ #import " ASHEditStepViewModel.h"
17
18
18
19
SpecBegin (ASHEditRecipeViewModel)
19
20
74
75
expect (viewModel.shouldShowCancelButton ).to .beTruthy ();
75
76
});
76
77
77
- pending (@" returns the correct properties of steps and film type" , ^{
78
-
78
+ it (@" returns the correct properties of steps and film type" , ^{
79
+ ASHEditRecipeViewModel *viewModel = [[ASHEditRecipeViewModel alloc ] initWithModel: recipe];
80
+ NSInteger section = 1 ;
81
+ int32_t filmType = 1 ;
82
+ NSInteger index = 0 ;
83
+
84
+ expect (viewModel.numberOfSteps ).to .equal (recipe.steps .count );
85
+ expect ([viewModel filmTypeForSection: section]).to .equal (filmType);
86
+ expect ([viewModel sectionForFilmTpe: filmType]).to .equal (section);
87
+ expect ([viewModel stepTitleAtIndex: index]).to .equal ([recipe.steps[index] name ]);
79
88
});
80
89
81
- pending (@" returns a correctly instantiated edit step view model" , ^{
90
+ it (@" returns a correctly instantiated edit step view model" , ^{
91
+ ASHEditRecipeViewModel *viewModel = [[ASHEditRecipeViewModel alloc ] initWithModel: recipe];
92
+ NSInteger index = 0 ;
93
+
94
+ ASHEditStepViewModel *editStepViewModel = [viewModel editStepViewModelAtIndex: index];
82
95
96
+ expect (editStepViewModel.model ).to .equal (viewModel.model .steps [index]);
83
97
});
84
98
});
85
99
You can’t perform that action at this time.
0 commit comments