Skip to content

Commit

Permalink
took out clearingStore from TestHelper.teardown
Browse files Browse the repository at this point in the history
  • Loading branch information
danielspaniel committed Apr 16, 2015
1 parent e1180c4 commit 3bd62ec
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 8 deletions.
38 changes: 31 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,21 @@ ember-data-factory-guy is now an ember-cli addon!

##### Have a previous installation as bower component or ember-cli-factory-guy

```bower uninstall ember-data-factory-guy```
- remove ember-data-factory-guy from bower.json, then:

```npm uninstall ember-cli-data-factory-guy```

then:

```ember install:addon ember-data-factory-guy```
- ```bower prune ```

- move your existing factories to tests/factories directory
- remove ember-cli-data-factory-guy or ember-data-factory-guy from package.json, then:

- ```npm prune ```

then:

- ```ember install:addon ember-data-factory-guy```

- ```ember install ember-data-factory-guy``` ( ember cli ^0.2.3 )

- then move your existing factories to tests/factories directory

### How this works

Expand Down Expand Up @@ -905,3 +910,22 @@ test("Creates new project", function () {

```
*NOTE*
TestHelper.teardown(), clears the store, and calls mockjacx.clear(), but there have been reports that
App.destroy with clearing the store is causing problems. So if you find this happening in your tests,
try teardown of this:
```teardown: function () {
Ember.run(function () {
TestHelper.teardown();
App.destroy();
});
}```
to this:
```teardown: function () {
Ember.run(function () {
$.mockjax.clear();
App.destroy();
});
} ```
1 change: 0 additions & 1 deletion addon/factory-guy-test-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,6 @@ var FactoryGuyTestHelper = Ember.Object.create({
},

teardown: function () {
FactoryGuy.clearStore();
$.mockjax.clear();
}
});
Expand Down

0 comments on commit 3bd62ec

Please sign in to comment.