Skip to content

Commit

Permalink
test(writeChangelog): updated test to reflect changes to method
Browse files Browse the repository at this point in the history
  • Loading branch information
Johnny Estilles committed Apr 21, 2015
1 parent 69fa1b0 commit b999948
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions test/git_changelog_generate.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -401,9 +401,12 @@ describe('git_changelog_generate.js', function() {

describe('without breaking commits', function() {

before(function() {
before(function(done) {
this.stream = {
write: sinon.stub()
write: sinon.stub(),
on: sinon.spy(function(event, callback) {
callback();
})
};
this.commits = require('./fixtures/commits.js').withoutBreaking;

Expand All @@ -412,7 +415,9 @@ describe('git_changelog_generate.js', function() {
sinon.stub(changelog, 'printSection');

changelog.initOptions({ app_name: 'app', version: 'version' });
changelog.writeChangelog(this.stream, this.commits);
changelog.writeChangelog(this.stream, this.commits).then(function() {
done();
});
});

after(function() {
Expand Down Expand Up @@ -458,9 +463,12 @@ describe('git_changelog_generate.js', function() {

describe('with breaking commits', function() {

before(function() {
before(function(done) {
this.stream = {
write: sinon.stub()
write: sinon.stub(),
on: sinon.spy(function(event, callback) {
callback();
})
};
this.commits = require('./fixtures/commits.js').withBreaking;

Expand All @@ -471,7 +479,9 @@ describe('git_changelog_generate.js', function() {
sinon.stub(changelog, 'printSection');

changelog.initOptions({ app_name: 'app', version: 'version' });
changelog.writeChangelog(this.stream, this.commits);
changelog.writeChangelog(this.stream, this.commits).then(function() {
done();
});
});

after(function() {
Expand Down

0 comments on commit b999948

Please sign in to comment.