@@ -46,7 +46,7 @@ describe("responder.js", function () {
4646
4747 context ( "when no data passed in" , function ( ) {
4848 it ( "calls responder.error()" , function ( done ) {
49- sinon . stub ( responder , 'error' , function ( res , err , next ) {
49+ sinon . stub ( responder , 'error' ) . callsFake ( function ( res , err , next ) {
5050 next ( ) ;
5151 } ) ;
5252
@@ -82,7 +82,7 @@ describe("responder.js", function () {
8282
8383 context ( "when no args passed in" , function ( ) {
8484 it ( "responds with an InternalError" , function ( done ) {
85- sinon . stub ( responder , 'error' , function ( res , err , next ) {
85+ sinon . stub ( responder , 'error' ) . callsFake ( function ( res , err , next ) {
8686 next ( ) ;
8787 } ) ;
8888
@@ -97,7 +97,7 @@ describe("responder.js", function () {
9797
9898 context ( "when args.url not passed in" , function ( ) {
9999 it ( "responds with an InternalError" , function ( done ) {
100- sinon . stub ( responder , 'error' , function ( res , err , next ) {
100+ sinon . stub ( responder , 'error' ) . callsFake ( function ( res , err , next ) {
101101 next ( ) ;
102102 } ) ;
103103
@@ -143,7 +143,7 @@ describe("responder.js", function () {
143143
144144 context ( "when no args passed in" , function ( ) {
145145 it ( "responds with an InternalError" , function ( done ) {
146- sinon . stub ( responder , 'error' , function ( res , err , next ) {
146+ sinon . stub ( responder , 'error' ) . callsFake ( function ( res , err , next ) {
147147 next ( ) ;
148148 } ) ;
149149
@@ -158,7 +158,7 @@ describe("responder.js", function () {
158158
159159 context ( "when args.filename not passed in" , function ( ) {
160160 it ( "responds with an InternalError" , function ( done ) {
161- sinon . stub ( responder , 'error' , function ( res , err , next ) {
161+ sinon . stub ( responder , 'error' ) . callsFake ( function ( res , err , next ) {
162162 next ( ) ;
163163 } ) ;
164164
@@ -174,7 +174,7 @@ describe("responder.js", function () {
174174
175175 context ( "when args.stream not passed in" , function ( ) {
176176 it ( "responds with an InternalError" , function ( done ) {
177- sinon . stub ( responder , 'error' , function ( res , err , next ) {
177+ sinon . stub ( responder , 'error' ) . callsFake ( function ( res , err , next ) {
178178 next ( ) ;
179179 } ) ;
180180
@@ -191,7 +191,7 @@ describe("responder.js", function () {
191191 context ( "when args.contentType not passed in" , function ( ) {
192192 it ( "responds with Content-Type header set to application/octet-stream" , function ( done ) {
193193 sinon . spy ( fake_res , 'setHeader' ) ;
194- sinon . stub ( args . stream , 'pipe' , function ( ) { } ) ;
194+ sinon . stub ( args . stream , 'pipe' ) . callsFake ( function ( ) { } ) ;
195195
196196 delete args . contentType ;
197197 responder . download ( fake_res , args , fake_next ) ;
@@ -207,7 +207,7 @@ describe("responder.js", function () {
207207 context ( "when args.contentLength not passed in" , function ( ) {
208208 it ( "responds without Content-Length header set" , function ( done ) {
209209 sinon . spy ( fake_res , 'setHeader' ) ;
210- sinon . stub ( args . stream , 'pipe' , function ( ) { } ) ;
210+ sinon . stub ( args . stream , 'pipe' ) . callsFake ( function ( ) { } ) ;
211211
212212 delete args . contentLength ;
213213 responder . download ( fake_res , args , fake_next ) ;
@@ -224,7 +224,7 @@ describe("responder.js", function () {
224224 it ( "responds without 200 status and content" , function ( done ) {
225225 sinon . spy ( fake_res , 'setHeader' ) ;
226226 sinon . spy ( fake_res , 'status' ) ;
227- sinon . stub ( args . stream , 'pipe' , function ( ) { } ) ;
227+ sinon . stub ( args . stream , 'pipe' ) . callsFake ( function ( ) { } ) ;
228228
229229 responder . download ( fake_res , args , fake_next ) ;
230230
0 commit comments