Created
June 21, 2012 16:46
-
-
Save joliss/2966942 to your computer and use it in GitHub Desktop.
Ember test setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
App.Dummy = DS.Model.extend() | |
App.preloadData = (data) -> | |
App.store.adapter.sideload(App.store, App.Dummy, data, null) | |
# preloadData is used for both testing and preloading models on page load, delivered through the HTML. | |
# in test: | |
fixtureData = | |
blogs: [ | |
... | |
] | |
articles: [ | |
... | |
] | |
... | |
setup -> | |
App.initializeStore() # App.store.destroy; App.store = ... | |
App.preloadData fixtureDate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment