Skip to content

Commit

Permalink
test: updated test to cover promise return from .generate()
Browse files Browse the repository at this point in the history
  • Loading branch information
Johnny Estilles committed Apr 20, 2015
1 parent d6a7ef9 commit c182ee4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/git_changelog.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,19 @@ var sinon = require('sinon');
var sinonChai = require('sinon-chai');
chai.use(sinonChai);

var q = require('q');
var grunt = require('grunt');
var changelog = require('../tasks/git_changelog_generate');

describe('git_changelog.js', function() {

before(function() {
sinon.spy(grunt, 'registerMultiTask');
sinon.stub(changelog, 'generate');
sinon.stub(changelog, 'generate', function() {
var deferred = q.defer();
deferred.resolve();
return deferred.promise;
});
});

after(function() {
Expand Down

0 comments on commit c182ee4

Please sign in to comment.