 describe 'Backbone.StateManager', =>
-
   beforeEach => @states = _.clone spec.helper.states
 
   afterEach => delete @states

        expect(@stateManager._matchState 'foo bar').toBeFalsy()

  describe 'addStateManager', =>

    it 'creates a new StateManager', =>
      StateManager = Backbone.StateManager
      spy = spyOn(Backbone, 'StateManager').andCallThrough()

        expect(@stateManager.enterState).toHaveBeenCalledWith 'foo', jasmine.any Object

      describe 'the current state is the same as the new state', =>
        it 'does nothing unless options.reEnter is set', =>
          @stateManager._matchState.andReturn @states.noTransitions
          @stateManager.currentState = 'noTransitions'
