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

Application's store unavailable message wrong for latest ember-cli-qunit #326

Closed
Charizard opened this issue Feb 8, 2018 · 7 comments
Closed

Comments

@Charizard
Copy link

With the new emberjs/rfcs#232 RFC, the error message when Factory Guy can't access the application instance is wrong.

This

Assertion Failed: [ember-data-factory-guy] FactoryGuy does not have the application's store.
       Use manualSetup(this.container) in model/component test
       before using make/makeList

should change to

Assertion Failed: [ember-data-factory-guy] FactoryGuy does not have the application's store.
       Use manualSetup(this.owner) in model/component test
       before using make/makeList
@danielspaniel
Copy link
Collaborator

Your 100% right, I have changed all my tests, but forgot to change the error message .. gimme a moment to fix that

@Charizard
Copy link
Author

*You are 😆

Thanks for the awesome addon though.

@danielspaniel
Copy link
Collaborator

This is now fixed in v2.13.24

I made it so you can not screw it up anymore since now .. you only have to do

manualSetup(this);

and it will so the right thing

Thanks for pointing out he message being wrong :)

@Turbo87
Copy link
Contributor

Turbo87 commented Feb 19, 2018

FWIW I would recommend exporting a setupFactoryGuy() function for the new testing APIs like this:

export function setupFactoryGuy(hooks) {
  hooks.beforeEach(function() {
    manualSetup(this.owner);
  });
}

@danielspaniel
Copy link
Collaborator

good suggestion .. stay tuned for that one

@danielspaniel
Copy link
Collaborator

v2.13.26 now has setupFactoryGuy(hooks) method @Turbo87

@Turbo87
Copy link
Contributor

Turbo87 commented Feb 19, 2018

awesome, thanks! seem like I can remove our custom one then 😉

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

No branches or pull requests

3 participants