I’m looking for some pointers on how to replace my models with fixtures during integration testing.
I have an ember-cli app that is using Ember Data with the Emberfire adapter for Firebase. When my integration tests run, I want to be able to stub out the store to use fixture data instead of hitting the real backend. I understand that the suggested approach is to mock out the http calls, but I obviously don’t want to have to rely upon the internals of how the Firebase adapter communicates with the server. So I have been trying to find a way to somehow replace the store while these tests are running with one that uses a fixtures adapter.
The main problem seems to be that by the time my test module’s setup is running, the singleton store has already been instantiated and hooked up to the firebase adapter, and I can’t work out how to replace either the store or the application adapter in the dependency container.
Am I even going about this the right way, or can you suggest a better approach for me to look at?