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(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
Updated for Ember 1.0.0 stable.