0.1.0 • Published 9 years ago

ember-test-container v0.1.0

Weekly downloads
4
License
MIT
Repository
github
Last release
9 years ago

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()
    });
  }
});