ember-test-container

Light-weight container for unit testing objects that rely on Ember's Container


Keywords
ember-addon
License
MIT
Install
npm install ember-test-container@0.1.0

Documentation

Ember-test-container

Light-weight container for unit testing objects that rely on Ember's container.

Installation

npm install ember-test-container --save-dev

Usage

In any unit test import and use the buildContainer function

import Ember from 'ember';
import { module, test } from 'qunit';
import buildContainer from 'dummy/tests/helpers/build-container';
import MyUtil from 'my-app/utils/my-util';

var User;

module('My Util', {
  setup: function() {
    MyUtil.reopen({
      container: buildContainer()
    });
  }
});