@@ -11,14 +11,21 @@ describe("Repository", function() {
1111 var Index = NodeGit . Index ;
1212 var Signature = NodeGit . Signature ;
1313
14+ var constReposPath = local ( "../repos/constworkdir" ) ;
1415 var reposPath = local ( "../repos/workdir" ) ;
1516 var newRepoPath = local ( "../repos/newrepo" ) ;
1617 var emptyRepoPath = local ( "../repos/empty" ) ;
1718
1819 beforeEach ( function ( ) {
1920 var test = this ;
2021
21- return Repository . open ( reposPath )
22+ return Repository . open ( constReposPath )
23+ . then ( function ( constRepository ) {
24+ test . constRepository = constRepository ;
25+ } )
26+ . then ( function ( ) {
27+ return Repository . open ( reposPath ) ;
28+ } )
2229 . then ( function ( repository ) {
2330 test . repository = repository ;
2431 } )
@@ -351,8 +358,8 @@ describe("Repository", function() {
351358 } ) ;
352359 } ) ;
353360
354- it ( "can obtain statistics from a valid repository" , function ( ) {
355- return this . repository . statistics ( )
361+ it ( "can obtain statistics from a valid constant repository" , function ( ) {
362+ return this . constRepository . statistics ( )
356363 . then ( function ( analysisReport ) {
357364
358365 assert . equal ( analysisReport . repositorySize . commits . count , 992 ) ;
@@ -363,7 +370,7 @@ describe("Repository", function() {
363370 assert . equal ( analysisReport . repositorySize . blobs . count , 4149 ) ;
364371 assert . equal ( analysisReport . repositorySize . blobs . size , 48489622 ) ;
365372 assert . equal ( analysisReport . repositorySize . annotatedTags . count , 1 ) ;
366- assert . equal ( analysisReport . repositorySize . references . count , 10 ) ;
373+ assert . equal ( analysisReport . repositorySize . references . count , 8 ) ;
367374
368375 assert . equal ( analysisReport . biggestObjects . commits . maxSize , 956 ) ;
369376 assert . equal ( analysisReport . biggestObjects . commits . maxParents , 2 ) ;
0 commit comments