old_contents: "use strict";
  
  var assert = require('assert');
  
  var smush2 = function(a,b) {
    if (b.indexOf(a) === 0) {
      return b;
    } 
  
    return a[0] + smush2(a.substr(1), b);
  };
  
  var smush = function() {
    if (arguments.length === 2) {
      var resultA = smush2(arguments[0], arguments[1]);
      var resultB = smush2(arguments[1], arguments[0]);
  
      return resultA.length > resultB.length ? resultB : resultA;
    }
  };
  
  describe('word smush', function() {
    describe('smush two works', function() {
      it('should concatenate words with no overlaps', function() {
        assert.equal("catdog", smush2("cat", "dog"));
      });
  
      it('should skip adjacent characters', function() {
        assert.equal('find', smush2('fin', 'ind'));
      });
    });
  
    describe('minimal solution', function() {
      it('should find the minimal solution for two words', function() {
        assert.equal('boing', smush('ing', 'boi'));
      });
    });
  });
new_contents: "use strict";
  
  var assert = require('assert');
  
  var smush2 = function(a,b) {
    if (b.indexOf(a) === 0) {
      return b;
    } 
  
    return a[0] + smush2(a.substr(1), b);
  };
  
  var best = function(x,y) {
    return x.length > y.length ? y : x;
  };
  
  var smush = function() {
    if (arguments.length === 2) {
      var resultA = smush2(arguments[0], arguments[1]);
      var resultB = smush2(arguments[1], arguments[0]);
  
      return best(resultA, resultB);
    }
  };
  
  describe('word smush', function() {
    describe('smush two works', function() {
      it('should concatenate words with no overlaps', function() {
        assert.equal("catdog", smush2("cat", "dog"));
      });
  
      it('should skip adjacent characters', function() {
        assert.equal('find', smush2('fin', 'ind'));
      });
    });
  
    describe('minimal solution', function() {
      it('should find the minimal solution for two words', function() {
        assert.equal('boing', smush('ing', 'boi'));
      });
    });
  });
subject: refactor our a method