3

According to ember guides testing a controller that has needs is like this:

moduleFor('controller:comments', 'Comments Controller', {
  needs: ['controller:post']
});

In my case I have a custom CommentsController but i don't have a custom PostController and Ember creates one for me.

But ember-qunit complains that it cannot find controller:post. If i explicitly define it, it works fine.

Do i have to explicitly define every controller that ember-qunit tests?

eguneys
  • 6,028
  • 7
  • 31
  • 63
  • If it's just a auto-generated controller, is it really necessary for your test? Maybe you could expand on what you're testing and how it's necessary. I can see how this is a limitation of ember-qunit though, and how this would work in a normal app just fine. – Kingpin2k Jul 28 '14 at 18:19
  • I just learned testing and saw that limitation asking just to make sure i am on the right track. – eguneys Jul 28 '14 at 18:28

0 Answers0