Skip to content

Commit 25de382

Browse files
committed
Physics unit tests fixed by re configuring cocos2d in setUp.
1 parent d94c116 commit 25de382

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

UnitTests/CCPhysicsTests.m

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
#import "CCPhysics+ObjectiveChipmunk.h"
1313
#import "CCDirector_Private.h"
14+
#import "AppDelegate.h"
1415

1516
@interface CCScheduler(Test)
1617

@@ -25,6 +26,14 @@ @interface CCPhysicsTests : XCTestCase <CCPhysicsCollisionDelegate>
2526

2627
@implementation CCPhysicsTests
2728

29+
- (void)setUp
30+
{
31+
[super setUp];
32+
33+
[(AppController *)[UIApplication sharedApplication].delegate configureCocos2d];
34+
[[CCDirector sharedDirector] startAnimation];
35+
}
36+
2837
static void
2938
TestBasicSequenceHelper(id self, CCPhysicsNode *physicsNode, CCNode *parent, CCNode *node, CCPhysicsBody *body)
3039
{

0 commit comments

Comments
 (0)