mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-03 11:14:27 +02:00
write correct one
This commit is contained in:
parent
1bd2f5de64
commit
30b1f58e77
1 changed files with 11 additions and 3 deletions
|
@ -6,11 +6,19 @@ prompt = require('prompt');
|
||||||
|
|
||||||
function getFile(truthy) {
|
function getFile(truthy) {
|
||||||
var filename = (truthy) ?
|
var filename = (truthy) ?
|
||||||
'./remote.spec.js' :
|
'./git.spec.js' :
|
||||||
'./git.spec.js';
|
'./remote.spec.js';
|
||||||
return fs.readFileSync(filename, 'utf8');
|
return fs.readFileSync(filename, 'utf8');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function writeFile(truthy, content) {
|
||||||
|
var filename = (truthy) ?
|
||||||
|
'./git.spec.js' :
|
||||||
|
'./remote.spec.js';
|
||||||
|
|
||||||
|
fs.writeFileSync(filename, content);
|
||||||
|
}
|
||||||
|
|
||||||
prompt.start();
|
prompt.start();
|
||||||
|
|
||||||
prompt.get(
|
prompt.get(
|
||||||
|
@ -34,7 +42,7 @@ prompt.get(
|
||||||
|
|
||||||
var funcCall = "\tit('" + result.whatItDoes + "', function() {\n" +
|
var funcCall = "\tit('" + result.whatItDoes + "', function() {\n" +
|
||||||
testCase + "\t});\n\n";
|
testCase + "\t});\n\n";
|
||||||
fs.writeFileSync('./remote.spec.js', partOne + funcCall + partTwo);
|
writeFile(result.intoGitSpec, partOne + funcCall + partTwo);
|
||||||
}, 100);
|
}, 100);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue