@@ -25,10 +25,11 @@ describe('fastboot command', function() {
2525 blockForever : RSVP . resolve ,
2626 checkPort : RSVP . resolve ,
2727 runServer : RSVP . resolve ,
28+ startServer : RSVP . resolve ,
2829 tasks : {
2930 Build : CoreObject . extend ( { run ( ) { buildRunCalled = true ; } } ) ,
3031 BuildWatch : CoreObject . extend ( { run ( ) { buildWatchRunCalled = true ; } } ) ,
31- } ,
32+ }
3233 } ) ;
3334 } ) ;
3435
@@ -57,6 +58,30 @@ describe('fastboot command', function() {
5758 } ) ;
5859 } ) ;
5960
61+ describe ( 'run server' , function ( ) {
62+ let command , serverStartCalled ;
63+
64+ beforeEach ( function ( ) {
65+ serverStartCalled = false ;
66+ command = new FastbootCommand ( {
67+ blockForever : RSVP . resolve ,
68+ checkPort : RSVP . resolve ,
69+ runBuild : RSVP . resolve ,
70+ ServerTask : CoreObject . extend ( {
71+ run ( ) { } ,
72+ start ( ) { serverStartCalled = true ; }
73+ } )
74+ } ) ;
75+ } ) ;
76+
77+ it ( 'immediately starts server when build=false' , function ( ) {
78+ const options = new CommandOptions ( { build : false } ) ;
79+ return command . run ( options ) . then ( ( ) => {
80+ expect ( serverStartCalled ) . to . equal ( true ) ;
81+ } ) ;
82+ } ) ;
83+ } ) ;
84+
6085 describe ( 'port check' , function ( ) {
6186 let command , isCalled ;
6287
0 commit comments