 
   describe '.checkoutReference(reference, [create])', ->
     repo = null
+    repoDirectory = null
 
     beforeEach ->
       repoDirectory = temp.mkdirSync('node-git-repo-')

      expect(repo.getHead()).toBe 'refs/heads/master'

    describe 'when a local reference exists', ->
      it 'checks the branch out if passed a short reference', ->
        expect(repo.checkoutReference('getHeadOriginal')).toBe true
        expect(repo.getHead()).toBe 'refs/heads/getHeadOriginal'

      it 'checks the branch out if passed a long reference', ->
        expect(repo.checkoutReference('refs/heads/getHeadOriginal')).toBe true
        expect(repo.getHead()).toBe 'refs/heads/getHeadOriginal'

    describe 'when a local reference doesn\'t exist', ->
      it 'does nothing if branch creation was not specified', ->

git = require '../lib/git'
path = require 'path'
fs = require 'fs'
exec = require('child_process').exec
wrench = require 'wrench'
temp = require 'temp'
_ = require 'underscore'
