@@ -13,15 +13,15 @@ var fs = require('fs'),
1313 helpers = require ( './helpers' ) ,
1414 forever = require ( '../lib/forever' ) ;
1515
16- var script = path . join ( __dirname , '..' , 'examples' , 'log-on-interval.js' ) ,
17- options = [ '--uid' , 'itShouldNotGoToUIDField' ] ;
16+ var script = path . join ( __dirname , '..' , 'examples' , 'log-on-interval.js' ) ;
1817
1918vows . describe ( 'forever/cli' ) . addBatch ( {
2019 'When using forever CLI' : {
2120 'and starting script using `forever start`' : helpers . spawn ( [ 'start' , script ] , {
2221 '`forever.list` result' : helpers . list ( {
2322 'should contain spawned process' : function ( list ) {
24- helpers . assertList ( list ) ;
23+ assert . isNotNull ( list ) ;
24+ assert . lengthOf ( list , 1 ) ;
2525 assert . equal ( list [ 0 ] . command , 'node' ) ;
2626 assert . equal ( fs . realpathSync ( list [ 0 ] . file ) , fs . realpathSync ( script ) ) ;
2727 helpers . assertStartsWith ( list [ 0 ] . logFile , forever . config . get ( 'root' ) ) ;
@@ -36,26 +36,5 @@ vows.describe('forever/cli').addBatch({
3636 } )
3737 } )
3838 }
39- } ) . addBatch ( {
40- 'When using forever CLI' : {
41- 'and starting script using `forever start` with arguments' : helpers . spawn ( [ 'start' , script ] . concat ( options ) , {
42- '`forever.list` result' : helpers . list ( {
43- 'should contain spawned process with proper options' : function ( list ) {
44- helpers . assertList ( list ) ;
45- assert . notEqual ( list [ 0 ] . uid , 'itShouldNotGoToUIDField' ) ;
46- assert . deepEqual ( list [ 0 ] . options , options ) ;
47- }
48- } )
49- } )
50- }
51- } ) . addBatch ( {
52- 'When testing forever CLI' : {
53- 'necessary cleanup' : {
54- topic : function ( ) {
55- forever . stopAll ( ) . on ( 'stopAll' , this . callback . bind ( { } , null ) ) ;
56- } ,
57- 'should take place' : function ( ) { }
58- }
59- }
6039} ) . export ( module ) ;
6140
0 commit comments