Skip to content

Commit

Permalink
fixed unit tests for copying media dirs
Browse files Browse the repository at this point in the history
  • Loading branch information
Caolan McMahon committed May 4, 2010
1 parent 2460ce9 commit cd2c6c5
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions test/test-petrify.js
Original file line number Diff line number Diff line change
Expand Up @@ -507,13 +507,19 @@ exports.testRun = function(test){

var exec_copy = child_process.exec;
child_process.exec = function(command, callback){
test.same(command, 'rm -r ' + options.output_dir);
test.equals(command, 'rm -r ' + options.output_dir);
child_process.exec = function(command, callback){
test.same(command, 'mkdir ' + options.output_dir);
test.equals(command, 'mkdir ' + options.output_dir);
child_process.exec = function(command, callback){
test.same(command, 'cp -r ' + options.media_dirs[0]);
test.equals(
command,
'cp -r '+options.media_dirs[0]+' '+options.output_dir
);
child_process.exec = function(command, callback){
test.same(command, 'cp -r ' + options.media_dirs[1]);
test.equals(
command,
'cp -r '+options.media_dirs[1]+' '+options.output_dir
);
process.nextTick(callback);
};
process.nextTick(callback);
Expand Down

0 comments on commit cd2c6c5

Please sign in to comment.