diff --git a/addon/ng2/blueprints/component/files/__path__/__name__.component.html b/addon/ng2/blueprints/component/files/__path__/__name__.component.html index faf71afb8d6c..200001f88129 100644 --- a/addon/ng2/blueprints/component/files/__path__/__name__.component.html +++ b/addon/ng2/blueprints/component/files/__path__/__name__.component.html @@ -1,3 +1,3 @@
- <%= dasherizedModuleName %> Works! + <%= dasherizedModuleName %> works!
diff --git a/addon/ng2/blueprints/component/files/__path__/__name__.component.spec.ts b/addon/ng2/blueprints/component/files/__path__/__name__.component.spec.ts index 20f60ef60ea5..33ee6b57ea7d 100644 --- a/addon/ng2/blueprints/component/files/__path__/__name__.component.spec.ts +++ b/addon/ng2/blueprints/component/files/__path__/__name__.component.spec.ts @@ -10,30 +10,13 @@ import { ComponentFixture, TestComponentBuilder } from 'angular2/testing'; -import {provide} from 'angular2/core';<% if (route) { %> -import {Router, RouteParams} from 'angular2/router';<% } %> -import {<%= classifiedModuleName %>Component} from './<%= dasherizedModuleName %>.component';<% if (route) { %> -class MockRouter { - registerPrimaryOutlet() { } -} +import {<%= classifiedModuleName %>Component} from './<%= dasherizedModuleName %>.component'; -class MockRouteParams { - get() { return 1; } -}<% } %> - -describe('<%= classifiedModuleName %> Component', () => { -<% if (route) { %> - beforeEachProviders(() => [ - provide(Router, { useClass: MockRouter }), - provide(RouteParams, { useClass: MockRouteParams }), - ]); -<% } else { %> - beforeEachProviders((): any[] => []); -<% } %> - it('should ...', async(inject([TestComponentBuilder], (tcb:TestComponentBuilder) => { - return tcb.createAsync(<%= classifiedModuleName %>Component).then((fixture: ComponentFixture) => { - fixture.detectChanges(); - }); - }))); +describe('Component: <%= classifiedModuleName %>', () => { + beforeEachProviders(() => [<%= classifiedModuleName %>Component]); + + it('should create the component', inject([<%= classifiedModuleName %>Component], (component: <%= classifiedModuleName %>Component) => { + expect(component).toBeTruthy(); + })); }); diff --git a/addon/ng2/blueprints/ng2/files/src/client/app/__name__.component.html b/addon/ng2/blueprints/ng2/files/src/client/app/__name__.component.html index d6ec35df559a..d942f4a4776d 100644 --- a/addon/ng2/blueprints/ng2/files/src/client/app/__name__.component.html +++ b/addon/ng2/blueprints/ng2/files/src/client/app/__name__.component.html @@ -1,3 +1,3 @@ -- <%= htmlComponentName %> Works! -
+