Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix tests

  • Loading branch information...
commit 906d1434f48c24e99691c1339c0e5de402c851ae 1 parent cd8984b
@sindresorhus sindresorhus authored
Showing with 7 additions and 9 deletions.
  1. +1 −0  .gitignore
  2. +6 −9 test/test-file-creation.js
View
1  .gitignore
@@ -1 +1,2 @@
node_modules
+test/temp
View
15 test/test-file-creation.js
@@ -4,15 +4,15 @@ var path = require('path');
var helpers = require('yeoman-generator').test;
describe('H5BP Mobile Boilerplate generator', function () {
- beforeEach(function(cb) {
- var deps = ['../../app', [helpers.createDummyGenerator(), 'mobile-boilerplate:app']];
+ beforeEach(function (cb) {
+ var deps = ['../../app'];
helpers.testDirectory(path.join(__dirname, 'temp'), function (err) {
if (err) {
return cb(err);
}
- this.mb = helpers.createGenerator('mobile-boilerplate:app', deps);
+ this.generator = helpers.createGenerator('mobile-boilerplate:app', deps);
cb();
}.bind(this));
});
@@ -20,13 +20,10 @@ describe('H5BP Mobile Boilerplate generator', function () {
it('generates expected files', function (cb) {
var expected = ['index.html', 'README.md'];
- helpers.mockPrompt(this.mb, { docs: 'y' });
+ helpers.mockPrompt(this.generator, { docs: 'y' });
- this.mb.sourceRoot(path.join(__dirname, 'temp'));
-
- this.mb.run({}, function () {
- // TODO: figure out why this doesn't work
- //helpers.assertFiles(expected);
+ this.generator.run({}, function () {
+ helpers.assertFiles(expected);
cb();
});
});
Please sign in to comment.
Something went wrong with that request. Please try again.