Skip to content

Commit

Permalink
re-order of the company.bs adjective and buzz (#496)
Browse files Browse the repository at this point in the history
- re-orderes adjective and buzz in the company.bs template literal for a correct gramatics as sugessted in the issue #496,
- re-orders the statements in the unit test to reflect the same order as in the function for an easier read.
  • Loading branch information
mbehzad committed Oct 21, 2017
1 parent 5021065 commit 70eb727
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/company.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ var Company = function (faker) {
* @method faker.company.bs
*/
this.bs = function () {
return f('{{company.bsAdjective}} {{company.bsBuzz}} {{company.bsNoun}}');
return f('{{company.bsBuzz}} {{company.bsAdjective}} {{company.bsNoun}}');
}

/**
Expand Down
10 changes: 5 additions & 5 deletions test/company.unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,22 +79,22 @@ describe("company.js", function () {
});

describe("bs()", function () {
it("returns phrase comprising of a BS adjective, buzz, and noun", function () {
it("returns phrase comprising of a BS buzz, adjective, and noun", function () {
sinon.spy(faker.random, 'arrayElement');
sinon.spy(faker.company, 'bsAdjective');
sinon.spy(faker.company, 'bsBuzz');
sinon.spy(faker.company, 'bsAdjective');
sinon.spy(faker.company, 'bsNoun');
var bs = faker.company.bs();

assert.ok(typeof bs === 'string');
assert.ok(faker.random.arrayElement.calledThrice);
assert.ok(faker.company.bsAdjective.calledOnce);
assert.ok(faker.company.bsBuzz.calledOnce);
assert.ok(faker.company.bsAdjective.calledOnce);
assert.ok(faker.company.bsNoun.calledOnce);

faker.random.arrayElement.restore();
faker.company.bsAdjective.restore();
faker.random.arrayElement.restore();
faker.company.bsBuzz.restore();
faker.company.bsAdjective.restore();
faker.company.bsNoun.restore();
});
});
Expand Down

0 comments on commit 70eb727

Please sign in to comment.