title: Angular 2 - Error Invalid provider unit test
body: <p>I'm working on a project with Angular 2 RC4 generate by Angular-Cli, and i have the same error on each of my unit test.</p>
  
  <blockquote>
    <p>Error: Invalid provider - only instances of Provider and Type are
    allowed, got: [object Object] (line 170)</p>
  </blockquote>
  
  <p>Here is a simple example of one spec :</p>
  
  <pre><code>import {addProviders,inject} from "@angular/core/testing";
  import {AppComponent} from "./app.component";
  
  beforeEach(() =&gt; {
    addProviders([AppComponent])
  });
  
  describe('Component : App', () =&gt; {
    it('should created an instance',
      inject([AppComponent], (app:AppComponent) =&gt; {
        expect(app).toBeTruthy();
      }));
  
  });
  </code></pre>
  
  <p>This error appears on each spec which need providers.</p>
  
  <p>Here is the component of app.component.ts</p>
  
  <pre><code>import { Component } from '@angular/core';
  import  { EnvComponent } from "./env/env.component"
  
  // Routage
  import { ROUTER_DIRECTIVES } from '@angular/router';
  
  @Component({
    moduleId: module.id,
    selector: 'app-root',
    templateUrl: 'app.component.html',
    styleUrls: ['app.component.css'],
    directives: [ROUTER_DIRECTIVES, EnvComponent],
  })
  
  
  export class AppComponent {
  
  }
  </code></pre>
  
  <p>PS :  The tests worked correctly in Angular 2 RC3</p>