code: function setup() {
      module('material.core', function($provide) {
        var $mdCompiler = { compile: angular.noop };
        $compilerSpy = spyOn($mdCompiler, 'compile');
        $themingSpy = jasmine.createSpy('$mdTheming');
  
        $provide.value('$mdCompiler', $mdCompiler);
        $provide.value('$mdTheming', $themingSpy);
      });
      inject(function($q, $compile, _$rootScope_, _$timeout_, _$material_) {
        $rootScope = _$rootScope_;
        $timeout = _$timeout_;
        $material = _$material_;
  
        $compilerSpy.and.callFake(function(opts) {
          var el = $compile(opts.template || "<div></div>");
          return $q(function(resolve){
            resolve({
              link: el,
              locals: {}
            });
            !$rootScope.$$phase && $rootScope.$apply();
          });
        });
      });
    }
docs: ************************************************ Internal utility methods ************************************************