Use of Ember.run.later breaks test runner
Closed this issue · 1 comments
vicramon commented
When testing a function that uses Ember.run.later
the test runner fails with the error:
ActionView::Template::Error: end of file reached
Here's some sample code:
# function under test
saveDone: ->
Ember.run.later(@, ( ->
@get('controller').set('isSaving', false)
), 1100)
# test code
describe "#saveDone", ->
it "sets isSaving false on its controller", ->
@view.saveDone()
@controller.get('isSaving').should.be.false
Is there a way to setup the Ember run loop in spec_helper so that this won't break?
kristianmandrup commented
I'm really not an expert on Konacha or Ember. I looked into tese techs for about a month (creating various gems/utils) and then I shifted my focus to AngularJS instead. I recommend that you ask some Konacha/Ember experts how to setup proper testing for your scenario and then you are most welcome to tweak this gem as you see fit ;)