'use strict';

var fs = require('fs');
var sh = require('shelljs');
var Version = require('../src/version');

describe('version', function() {
  var version = new Version();

  beforeEach(function() {
    version.configFile.get = function() {
      var config = {
        version: '0.0.0'
      };
      return config;
    };

    spyOn(version.configFile, 'get').and.callThrough();
  });

  it('should get', function() {
    var expected = '0.0.0'

    var res = version.get();

    expect(version.configFile.get).toHaveBeenCalled();
    expect(res).toEqual(expected);
  });
});

@@ -568,13 +568,586 @@
 );%0A  %7D);
+%0A%0A  it('should inc', function() %7B%0A    version.get = function() %7B%0A      return '0.0.0';%0A    %7D;%0A    var res;%0A    version.set = function(newVersion) %7B%0A      res = newVersion;%0A    %7D;%0A%0A    var expected = '0.0.1'%0A%0A    version.inc();%0A%0A    expect(res).toEqual(expected);%0A  %7D);%0A%0A  it('should inc with type', function() %7B%0A    version.get = function() %7B%0A      return '0.0.0';%0A    %7D;%0A    var res;%0A    version.set = function(newVersion) %7B%0A      res = newVersion;%0A    %7D;%0A    var type = 'minor';%0A    var expected = '0.1.0'%0A%0A    version.inc(type);%0A%0A    expect(res).toEqual(expected);%0A  %7D);
 %0A%7D);%0A

Add tests