Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure moduleForModel uses the correct store for subject. #28

Merged

Conversation

rwjblue
Copy link
Member

@rwjblue rwjblue commented Mar 24, 2015

Previously, the container was shared across each module (NOT each test) inside this.subject() and this.store().

This ensures that those callbacks grab the container for each test run (instead of using the closure scope variable).

Credit to @bmac for tracking down the cause, and providing a reliable test reproduction.

Previously, the `container` was shared across each module (NOT each
test) inside `this.subject()` and `this.store()`.

This ensures that those callbacks grab the `container` for each test
run (instead of using the closure scope variable).
rwjblue added a commit that referenced this pull request Mar 24, 2015
Ensure `moduleForModel` uses the correct store for `subject`.
@rwjblue rwjblue merged commit df98816 into emberjs:master Mar 24, 2015
@rwjblue rwjblue deleted the fix-shared-store-in-subsequent-tests branch March 24, 2015 11:30
@dgeb
Copy link
Member

dgeb commented Mar 24, 2015

Thanks @rwjblue and @bmac <3

I'll update ember-mocha soon.

@subhashb
Copy link

@rwjblue and @dgeb,
Should this fix be ported to ember-cli-qunit as well? I faced the same issue with "ember-cli-qunit": "0.3.9" and worked around it by creating the model using store.createRecord instead of this.subject()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants