Unit test solution does not work in Ember 2.1: this.container.register is not a function
this.container.register is not a function
The updated code for injection would be : beforeEach -> @register 'service:mockservice', mockService @inject.service 'realService', as: 'mockservice' ``` Source: https://guides.emberjs.com/v2.1.0/testing/testing-components/#toc_stubbing-services
beforeEach ->
Unit test solution does not work in Ember 2.1:
this.container.register is not a function
The updated code for injection would be :
beforeEach ->
@register 'service:mockservice', mockService
@inject.service 'realService', as: 'mockservice'
```
Source: https://guides.emberjs.com/v2.1.0/testing/testing-components/#toc_stubbing-services