Skip to content

Commit

Permalink
Added empty questions & test to topic
Browse files Browse the repository at this point in the history
  • Loading branch information
grosshei committed Nov 13, 2012
1 parent ee57e6d commit b693c03
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions BrowseOverflowTests/TopicTests.m
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -31,4 +31,9 @@ -(void) testThatTopicHasATag{
STAssertEqualObjects(topic.tag, @"iphone", @"Topics need to have tags"); STAssertEqualObjects(topic.tag, @"iphone", @"Topics need to have tags");
} }


-(void)testForAListOfQuestions{
STAssertTrue([[topic recentQuestions] isKindOfClass:[NSArray class]],
@"Topics should provide a list of recent questions");
}

@end @end
1 change: 1 addition & 0 deletions Topic.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
@property (readonly) NSString *tag; @property (readonly) NSString *tag;


-(id)initWithName:(NSString *)newName tag:newTag; -(id)initWithName:(NSString *)newName tag:newTag;
-(NSArray *)recentQuestions;


@end @end
4 changes: 4 additions & 0 deletions Topic.m
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -20,4 +20,8 @@ -(id)initWithName:(NSString *)newName tag:newTag{
return self; return self;
} }


-(NSArray *)recentQuestions{
return [NSArray array];
}

@end @end

0 comments on commit b693c03

Please sign in to comment.