getoutreach / epf

A framework for keeping your Ember.js apps in sync.
http://epf.io
MIT License
369 stars 33 forks source link

Testing EPF on ember-cli? #133

Open yaymukund opened 10 years ago

yaymukund commented 10 years ago

It looks like ember-cli calls DS._setupContainer to setup tests. Is there a recommended way to do this with EPF yet?

ghempton commented 10 years ago

There is an equivalent epf method: Ep.setupContainer On May 21, 2014 9:23 AM, "Mukund Lakshman" notifications@github.com wrote:

It looks like ember-cli calls DS._setupContainer to setup testshttps://github.com/rpflorence/ember-qunit/blob/master/lib/module-for-model.js#L4-29. Is there a recommended way to do this with EPF yet?

— Reply to this email directly or view it on GitHubhttps://github.com/getoutreach/epf/issues/133 .

devmanhinton commented 10 years ago

Great! I'm setting up EPF w/ ember-qunit & Ember-Cli

In ember-qunit moduleForModel

I replaced the call to DS._setupContainer with Ep.setupContainer. Running tests then throws 'undefined' is not an object (evaluating 'Ep.__container__.lookupFactory')

My solution is to manually set Ep.__container__ which works

      Ep.setupContainer(container);
      Ep.__container__ = container;

Is this expected behavior?

ghempton commented 10 years ago

This makes sense. Soon I am going to be removing the need to set Ep.container in tests.

On Fri, May 23, 2014 at 8:23 AM, Devon Hinton notifications@github.comwrote:

Great! I'm setting up EPF w/ ember-qunit & Ember-Cli

In ember-qunit moduleForModelhttps://github.com/rpflorence/ember-qunit/blob/master/lib/module-for-model.js

I replaced the call to DS. _setupContainer with Ep.setupContainer. Running tests then throws 'undefined' is not an object (evaluating 'Ep.__container__ .lookupFactory')

My solution is to manually set Ep.container which works

  Ep.setupContainer(container);
  Ep.__container__ = container;

Is this expected behavior?

— Reply to this email directly or view it on GitHubhttps://github.com/getoutreach/epf/issues/133#issuecomment-44025100 .

Gordon L. Hempton http://codebrief.com 360.460.8098

devmanhinton commented 10 years ago

Ah Cool, thanks for responding :smile:

Genkilabs commented 9 years ago

@devmanhinton Did you ever get EPF set up and working with ember-cli? I have been trying various ways to include it from the bower build 0.3.5 with no luck. Lots of undefined errors... It looks as though there are others interested in this as well: https://github.com/getoutreach/epf/issues/138

devmanhinton commented 9 years ago

Hmmmm @Genkilabs We did get EPF working w/ ember-cli (though we never got around to specs before the project had to be released). @yaymukund did a lot of this setup -- perhaps he remembers more of the steps?