From 68ed8f1b6bb34125f3f25a50d2f1fac7233e6827 Mon Sep 17 00:00:00 2001 From: Brian Ford Date: Fri, 1 May 2015 15:43:54 -0700 Subject: [PATCH] refactor(router): rename LocationMock to LocationSpy --- modules/angular2/src/mock/location_mock.js | 2 +- modules/angular2/test/router/outlet_spec.js | 4 ++-- modules/angular2/test/router/router_spec.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/angular2/src/mock/location_mock.js b/modules/angular2/src/mock/location_mock.js index d615aa5a98..fe3685ffad 100644 --- a/modules/angular2/src/mock/location_mock.js +++ b/modules/angular2/src/mock/location_mock.js @@ -8,7 +8,7 @@ import {Location} from 'angular2/src/router/location'; @proxy @IMPLEMENTS(Location) -export class DummyLocation extends SpyObject { +export class SpyLocation extends SpyObject { urlChanges:List; _path:string; _subject:EventEmitter; diff --git a/modules/angular2/test/router/outlet_spec.js b/modules/angular2/test/router/outlet_spec.js index 682fd6679d..272f64061d 100644 --- a/modules/angular2/test/router/outlet_spec.js +++ b/modules/angular2/test/router/outlet_spec.js @@ -25,7 +25,7 @@ import {Router, RouterOutlet, RouterLink, RouteConfig, RouteParams} from 'angula import {DOM} from 'angular2/src/dom/dom_adapter'; -import {DummyLocation} from 'angular2/src/mock/location_mock'; +import {SpyLocation} from 'angular2/src/mock/location_mock'; import {Location} from 'angular2/src/router/location'; import {RouteRegistry} from 'angular2/src/router/route_registry'; import {DirectiveMetadataReader} from 'angular2/src/core/compiler/directive_metadata_reader'; @@ -39,7 +39,7 @@ export function main() { Pipeline, RouteRegistry, DirectiveMetadataReader, - bind(Location).toClass(DummyLocation), + bind(Location).toClass(SpyLocation), bind(Router).toFactory((registry, pipeline, location) => { return new RootRouter(registry, pipeline, location, MyComp); }, [RouteRegistry, Pipeline, Location]) diff --git a/modules/angular2/test/router/router_spec.js b/modules/angular2/test/router/router_spec.js index 7052e3d150..994c12a560 100644 --- a/modules/angular2/test/router/router_spec.js +++ b/modules/angular2/test/router/router_spec.js @@ -12,7 +12,7 @@ import {Promise, PromiseWrapper} from 'angular2/src/facade/async'; import {Router, RootRouter} from 'angular2/src/router/router'; import {Pipeline} from 'angular2/src/router/pipeline'; import {RouterOutlet} from 'angular2/src/router/router_outlet'; -import {DummyLocation} from 'angular2/src/mock/location_mock' +import {SpyLocation} from 'angular2/src/mock/location_mock' import {Location} from 'angular2/src/router/location'; import {RouteRegistry} from 'angular2/src/router/route_registry'; @@ -29,7 +29,7 @@ export function main() { Pipeline, RouteRegistry, DirectiveMetadataReader, - bind(Location).toClass(DummyLocation), + bind(Location).toClass(SpyLocation), bind(Router).toFactory((registry, pipeline, location) => { return new RootRouter(registry, pipeline, location, AppCmp); }, [RouteRegistry, Pipeline, Location])