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

Commit

Permalink
Merge pull request #32 from timkelty/master
Browse files Browse the repository at this point in the history
Add additional stubbing to tests for unexpected git environments.
  • Loading branch information
gregberge committed Mar 25, 2015
2 parents f9dd90b + d899991 commit dfbbdd4
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/unit/tasks/deploy/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ describe('deploy:update task', function () {
beforeEach(function () {
sinon.stub(shipit, 'remote').resolves();
sinon.stub(shipit, 'remoteCopy').resolves();
sinon.stub(shipit, 'local', function (command) {
if (command === 'git rev-parse ' + shipit.config.branch) {
return Promise.resolve(
{stdout: '9d63d434a921f496c12854a53cef8d293e2b4756\n'}
);
}
});
});

afterEach(function () {
Expand Down Expand Up @@ -67,6 +74,13 @@ describe('deploy:update task', function () {
beforeEach(function () {
sinon.stub(shipit, 'remote').resolves();
sinon.stub(shipit, 'remoteCopy').resolves();
sinon.stub(shipit, 'local', function (command) {
if (command === 'git rev-parse ' + shipit.config.branch) {
return Promise.resolve(
{stdout: '9d63d434a921f496c12854a53cef8d293e2b4756\n'}
);
}
});
});
afterEach(function () {
shipit.remote.restore();
Expand Down

0 comments on commit dfbbdd4

Please sign in to comment.