@@ -20,7 +20,7 @@ define([
2020 var sound ;
2121 var filename = 'specs/fixtures/yipee.wav' ;
2222 var filename2 = 'specs/fixtures/yipee' ;
23- var noteOn = jasmine . createSpy ( 'noteOn ' ) ;
23+ var start = jasmine . createSpy ( 'start ' ) ;
2424
2525 beforeEach ( function ( ) {
2626 sound = new WebAudio ( ) ;
@@ -147,7 +147,7 @@ define([
147147
148148 beforeEach ( function ( ) {
149149 spyOn ( sound , '_initAudio' ) . andReturn ( {
150- noteOn : noteOn
150+ start : start
151151 } ) ;
152152
153153 runs ( function ( ) {
@@ -183,11 +183,11 @@ define([
183183 } ) ;
184184 } ) ;
185185
186- it ( 'should call noteOn with startTime of 0' , function ( ) {
186+ it ( 'should call start with startTime of 0' , function ( ) {
187187 runs ( function ( ) {
188188 sound . loop ( ) ;
189- expect ( noteOn ) . toHaveBeenCalled ( ) ;
190- expect ( noteOn ) . toHaveBeenCalledWith ( 0 ) ;
189+ expect ( start ) . toHaveBeenCalled ( ) ;
190+ expect ( start ) . toHaveBeenCalledWith ( 0 ) ;
191191 } ) ;
192192 } ) ;
193193
@@ -197,7 +197,7 @@ define([
197197
198198 beforeEach ( function ( ) {
199199 spyOn ( sound , '_initAudio' ) . andReturn ( {
200- noteOn : noteOn
200+ start : start
201201 } ) ;
202202
203203 runs ( function ( ) {
@@ -233,19 +233,19 @@ define([
233233 } ) ;
234234 } ) ;
235235
236- it ( 'should call noteOn with startTime of 0 if startTime not passed in' , function ( ) {
236+ it ( 'should call start with startTime of 0 if startTime not passed in' , function ( ) {
237237 runs ( function ( ) {
238238 sound . play ( ) ;
239- expect ( noteOn ) . toHaveBeenCalled ( ) ;
240- expect ( noteOn ) . toHaveBeenCalledWith ( 0 ) ;
239+ expect ( start ) . toHaveBeenCalled ( ) ;
240+ expect ( start ) . toHaveBeenCalledWith ( 0 ) ;
241241 } ) ;
242242 } ) ;
243243
244- it ( 'should call noteOn with startTime passed in' , function ( ) {
244+ it ( 'should call start with startTime passed in' , function ( ) {
245245 runs ( function ( ) {
246246 sound . play ( 1 , 100 ) ;
247- expect ( noteOn ) . toHaveBeenCalled ( ) ;
248- expect ( noteOn ) . toHaveBeenCalledWith ( 100 ) ;
247+ expect ( start ) . toHaveBeenCalled ( ) ;
248+ expect ( start ) . toHaveBeenCalledWith ( 100 ) ;
249249 } ) ;
250250 } ) ;
251251
@@ -266,6 +266,8 @@ define([
266266 it ( 'should return a source' , function ( ) {
267267 runs ( function ( ) {
268268 expect ( sound . _initAudio ( ) ) . toBeDefined ( ) ;
269+ expect ( sound . _initAudio ( 1 ) ) . toBeDefined ( ) ;
270+ expect ( sound . _initAudio ( 1 , true ) ) . toBeDefined ( ) ;
269271 } ) ;
270272 } ) ;
271273
0 commit comments