change to headless to support tags and dont break all tests Pull Request #137 Issue #134

This commit is contained in:
Peter Cottle 2013-10-27 12:48:48 -07:00
parent ebfd5e84d2
commit aa39e1af3c
3 changed files with 16 additions and 0 deletions

View file

@ -11,6 +11,7 @@ var EventBaton = require('../util/eventBaton').EventBaton;
var Collections = require('../models/collections');
var CommitCollection = Collections.CommitCollection;
var BranchCollection = Collections.BranchCollection;
var TagCollection = Collections.TagCollection;
var Command = require('../models/commandModel').Command;
var mock = require('../util/mock').mock;
@ -70,6 +71,7 @@ var HeadlessGit = function() {
HeadlessGit.prototype.init = function() {
this.commitCollection = new CommitCollection();
this.branchCollection = new BranchCollection();
this.tagCollection = new TagCollection();
// here we mock visuals and animation factory so the git engine
// is headless
@ -84,6 +86,7 @@ HeadlessGit.prototype.init = function() {
this.gitEngine = new GitEngine({
collection: this.commitCollection,
branches: this.branchCollection,
tags: this.tagCollection,
gitVisuals: gitVisuals,
animationFactory: animationFactory,
eventBaton: new EventBaton()