Skip to content

Instantly share code, notes, and snippets.

@mars mars/foo-app-test.js
Last active Dec 20, 2015

Embed
What would you like to do?
ember-testing: multiple app compatibility
// give each tested app its own DOM element
document.write('<div class="ember-testing-container"><div id="foo-app-testing"></div></div>');
FooApp.rootElement = '#foo-app-testing';
// defer readiness
FooApp.setupForTesting();
module("Foo App", {
setup: function() {
FooApp.injectTestHelpers();
// last step, before each test begins, clears the container and advances readiness
FooApp.reset();
},
teardown: function() {
// clear the helpers everytime so that a different app can inject them
FooApp.removeTestHelpers();
}
});
@mars

This comment has been minimized.

Copy link
Owner Author

mars commented Sep 25, 2013

Updated for Ember 1.0.0 stable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.