mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-01 18:24:28 +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) {
|
||||
var filename = (truthy) ?
|
||||
'./remote.spec.js' :
|
||||
'./git.spec.js';
|
||||
'./git.spec.js' :
|
||||
'./remote.spec.js';
|
||||
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.get(
|
||||
|
@ -34,7 +42,7 @@ prompt.get(
|
|||
|
||||
var funcCall = "\tit('" + result.whatItDoes + "', function() {\n" +
|
||||
testCase + "\t});\n\n";
|
||||
fs.writeFileSync('./remote.spec.js', partOne + funcCall + partTwo);
|
||||
writeFile(result.intoGitSpec, partOne + funcCall + partTwo);
|
||||
}, 100);
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue