 describe 'Fitness Controller', ->
-  $scope = null
+  $scope = $timeout = null
   userResponse = {"member_since":"2012-12-13",
   "avatar_url":"https://cloudfront.net/50_square.jpg",
   "city":"Denver","state":"CO","height":80,


    it 'get the data for the new time frame', ->
      $scope.setTimeFrame('1m')
      expect(fitbitStub.activity_time_series_data).toHaveBeenCalledWith('1m')
      expect(fitbitStub.sleep_time_series_data).toHaveBeenCalledWith('1m')



  beforeEach module 'app.controllers.fitness'

  beforeEach inject ($rootScope, $controller, _$timeout_) ->
    $scope = $rootScope.$new()
    $timeout = _$timeout_
    $controller 'fitnessCtrl',
      $scope: $scope
      Fitbit: fitbitStub
