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

Support non ember-data models #29

Closed
fivetanley opened this issue Mar 25, 2015 · 8 comments
Closed

Support non ember-data models #29

fivetanley opened this issue Mar 25, 2015 · 8 comments

Comments

@fivetanley
Copy link
Member

Files in the models folder currently get nerfed due to: https://github.com/switchfly/ember-test-helpers/blob/master/lib/ember-test-helpers/test-module-for-model.js#L41

Error:

Error: Assertion Failed: `(unknown mixin)` does not appear to be an ember-data model
    at new Error (native)
@rwjblue
Copy link
Member

rwjblue commented Mar 25, 2015

I would use moduleFor('model:post') in a non-ED scenario.

We can provide a nice helpful assertion though, when you call moduleForModel on a non-ED model, what is the "proper" way to detect if a given factory is an Ember Data model?

@fivetanley
Copy link
Member Author

store.modelFactoryFor('post') instanceof DS.Model ?

@walter
Copy link

walter commented Apr 28, 2015

👍 for implementing something that is agnostic. I'm using ember-orbit with ember-mocha and was surprised by describeModel (which wraps moduleForModel) breaking on the ED dependency.

@rwjblue
Copy link
Member

rwjblue commented Apr 29, 2015

We'd happily review a pull request with a proposed solution.

@walter
Copy link

walter commented Apr 29, 2015

Thx @rwjblue, I appreciate your and the rest of contributors' work on this.

I realize I'm not contributing much by simply adding my voice in support of the issue, but the intention is to show that there people who would like this, too.

If I had the means to add a PR for this right now, I would. I'm a long time open source maintainer myself and I realize how much more valuable contributed code is. Having said that, I do believe it is perfectly valid to add to a project by voicing your needs. You, of course, have no obligation to implement what I ask for. I do not feel entitled to anything in regards to the project.

Hey, at least I didn't create a NEW issue without searching existing issues that address my concerns first!

@rwjblue
Copy link
Member

rwjblue commented Apr 29, 2015

I am very sorry if that last comment came off as snarky or negative. I was basically saying that I would definitely be open to a fix, just haven't had time (or a personal need) to dig into it myself yet.

@walter
Copy link

walter commented Apr 29, 2015

All cool. No worries. I was just leaving a little something behind to show that I appreciate the work on this instead of just being a help vampire (can't think of what the OSS equivalent is at the moment).

@rwjblue
Copy link
Member

rwjblue commented Nov 30, 2017

This should be addressed when using the new testing APIs provided by ember-qunit (e.g. moduleForModel is no longer "a thing").

Closing....

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

4 participants