Permalink
Browse files

Making sure Kiwi doesn't throw any exceptions if the spec has nested …

…contexts but no examples.
  • Loading branch information...
1 parent af4f08d commit 3a29914a155722776f7dc451244db989a428e395 @roustem roustem committed Jul 12, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 Kiwi/KWExampleSuite.m
View
@@ -42,7 +42,9 @@ - (void)addExample:(KWExample *)example
- (void)markLastExampleAsLastInContext:(KWContextNode *)context
{
- [[examples objectAtIndex:examples.count-1] setLastInContext:context];
+ if ([examples count] > 0) {
+ [[examples objectAtIndex:examples.count-1] setLastInContext:context];
+ }
}
- (NSArray *)invocationsForTestCase;

0 comments on commit 3a29914

Please sign in to comment.