Skip to content

Instantly share code, notes, and snippets.

@rhysforyou
Created December 6, 2011 05:58
Show Gist options
  • Select an option

  • Save rhysforyou/1436946 to your computer and use it in GitHub Desktop.

Select an option

Save rhysforyou/1436946 to your computer and use it in GitHub Desktop.
#import "Game.h"
#import <SenTestingKit/SenTestingKit.h>
@interface BowlingGameTest : SenTestCase
{
}
@end
@implementation BowlingGameTest
- (void)testGutterGame {
Game *game = [game init];
for (int i = 0; i < 20; i++) {
[game rollWithPinCount:0];
}
STAssertEquals([game score], 0, @"Gutter game should total 0");
}
@end
#import <Foundation/Foundation.h>
@interface Game : NSObject
- (void)rollWithPinCount:(int)pins;
- (int)score;
@end
#import "Game.h"
@implementation Game
- (void)rollWithPinCount:(int)pins {
}
- (int)score {
return -1;
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment