GUI -- Cleaned up table directives, device view, fixed flash-spec unit tests, started unt tests for table.js.

Change-Id: I3020fec5f3f57cebc237c1a6cbfd07deb3607189
diff --git a/web/gui/src/main/webapp/tests/app/view/device/device-spec.js b/web/gui/src/main/webapp/tests/app/view/device/device-spec.js
index 780cbc0..ffd6e55 100644
--- a/web/gui/src/main/webapp/tests/app/view/device/device-spec.js
+++ b/web/gui/src/main/webapp/tests/app/view/device/device-spec.js
@@ -45,14 +45,16 @@
         $scope = $rootScope.$new();
         $controller = _$controller_;
         $mockHttp = $httpBackend;
-
-        $mockHttp.whenGET(/\/device$/).respond(fakeData);
     }));
 
+    beforeEach(function() {
+        $scope = {};
+        ctrl = $controller('OvDeviceCtrl', { $scope: $scope });
+        $mockHttp.whenGET(/\/device$/).respond(fakeData);
+    });
+
+
     it('should be an empty array and then have device data', function () {
-        ctrl = $controller('OvDeviceCtrl', {
-            $scope: $scope
-        });
         expect(ctrl.deviceData).toEqual([]);
         $scope.sortCallback();
         $mockHttp.flush();