Skip to content
This repository has been archived by the owner on Mar 26, 2018. It is now read-only.

Commit

Permalink
removed mocha ui option and set to bdd
Browse files Browse the repository at this point in the history
  • Loading branch information
mteodori committed Mar 26, 2016
1 parent cb8f58a commit 4722c3d
Show file tree
Hide file tree
Showing 34 changed files with 3 additions and 162 deletions.
5 changes: 2 additions & 3 deletions generators/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ var BackboneGenerator = yeoman.generators.Base.extend({

this.config.defaults({
appName: this.appname,
ui: this.options.ui,
coffee: this.options.coffee,
testFramework: this.testFramework,
templateFramework: this.templateFramework,
Expand Down Expand Up @@ -364,13 +363,13 @@ var BackboneGenerator = yeoman.generators.Base.extend({
this.composeWith(this.testFramework, {
options: {
'skip-install': this.options['skip-install'],
'ui': this.options.ui,
'ui': 'bdd',
'skipMessage': true
}
});
}
}

},

setSuffix: function () {
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

6 changes: 0 additions & 6 deletions generators/templates/coffeescript/test/mocha/tdd/model.coffee

This file was deleted.

This file was deleted.

6 changes: 0 additions & 6 deletions generators/templates/coffeescript/test/mocha/tdd/view.coffee

This file was deleted.

12 changes: 0 additions & 12 deletions generators/templates/requirejs/test/mocha/tdd/collection.js

This file was deleted.

12 changes: 0 additions & 12 deletions generators/templates/requirejs/test/mocha/tdd/model.js

This file was deleted.

12 changes: 0 additions & 12 deletions generators/templates/requirejs/test/mocha/tdd/router.js

This file was deleted.

12 changes: 0 additions & 12 deletions generators/templates/requirejs/test/mocha/tdd/view.js

This file was deleted.

10 changes: 0 additions & 10 deletions generators/templates/test/mocha/tdd/collection.js

This file was deleted.

10 changes: 0 additions & 10 deletions generators/templates/test/mocha/tdd/model.js

This file was deleted.

10 changes: 0 additions & 10 deletions generators/templates/test/mocha/tdd/router.js

This file was deleted.

10 changes: 0 additions & 10 deletions generators/templates/test/mocha/tdd/view.js

This file was deleted.

16 changes: 1 addition & 15 deletions script-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,20 +77,6 @@ var ScriptBase = yeoman.generators.NamedBase.extend({
return this.config.get('testFramework') === 'mocha';
},

_getMochaUi: function() {
var ui = this.config.get('ui');

if (!ui) {
try {
ui = require(path.join(process.cwd(), '.yo-rc.json'))['generator-mocha'].ui;
} catch (e) {
ui = 'bdd';
}
}

return ui;
},

_getGenerateOptions: function (options) {
options = options || {};
options.appClassName = options.appClassName || pascalCase(this.appname);
Expand All @@ -117,7 +103,7 @@ var ScriptBase = yeoman.generators.NamedBase.extend({
dest = dest || type + 's';

this._writeTemplate(
path.join('test', this.config.get('testFramework'), this._getMochaUi(), type),
path.join('test', this.config.get('testFramework'), type),
path.join('test', 'spec', dest, this.name + '.spec'),
this._getGenerateOptions(options)
);
Expand Down

0 comments on commit 4722c3d

Please sign in to comment.