@@ -6,6 +6,7 @@ var IonicAppLib = require('ionic-app-lib'),
66 Task = require ( '../lib/ionic/task' ) . Task ,
77 Info = IonicAppLib . info ,
88 Utils = IonicAppLib . utils ,
9+ Project = IonicAppLib . project ,
910 rewire = require ( 'rewire' ) ;
1011
1112describe ( 'Cli' , function ( ) {
@@ -17,6 +18,8 @@ describe('Cli', function() {
1718 spyOn ( IonicAppLib . events , 'on' ) ;
1819 spyOn ( process , 'on' ) ;
1920 spyOn ( Info , 'checkRuntime' ) ;
21+ spyOn ( Utils , 'cdIonicRoot' ) ;
22+ spyOn ( Project , 'load' ) ;
2023
2124 spyOn ( Utils , 'fail' ) . andCallFake ( function ( err ) {
2225 console . log ( err ) ;
@@ -129,13 +132,11 @@ describe('Cli', function() {
129132 } ) ;
130133
131134 it ( 'should change pwd for commands' , function ( ) {
132- spyOn ( Utils , 'cdIonicRoot' ) ;
133135 IonicCli . run ( [ 'node' , 'bin/ionic' , 'serve' ] ) ;
134136 expect ( Utils . cdIonicRoot ) . toHaveBeenCalled ( ) ;
135137 } ) ;
136138
137139 it ( 'should not change pwd for commands' , function ( ) {
138- spyOn ( Utils , 'cdIonicRoot' ) ;
139140 IonicCli . run ( [ 'node' , 'bin/ionic' , 'start' ] ) ;
140141 expect ( Utils . cdIonicRoot ) . not . toHaveBeenCalled ( ) ;
141142 } ) ;
0 commit comments