Skip to content

Commit

Permalink
Merge pull request #4478 from rwjblue/store-application-instance-in-t…
Browse files Browse the repository at this point in the history
…est-context

Store acceptance test application in test context.
  • Loading branch information
stefanpenner committed Jul 18, 2015
2 parents 3db4a0a + 1f3c8fe commit 5766abb
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@ import Ember from 'ember';
import { module, test } from 'qunit';
import startApp from '<%= testFolderRoot %>/tests/helpers/start-app';

var application;

module('<%= friendlyTestName %>', {
beforeEach: function() {
application = startApp();
this.application = startApp();
},

afterEach: function() {
Ember.run(application, 'destroy');
Ember.run(this.application, 'destroy');
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@ import Ember from 'ember';
import startApp from '../helpers/start-app';
import { module, test } from 'qunit';

var application;

module('Acceptance', {
beforeEach: function() {
application = startApp();
this.application = startApp();
},
afterEach: function() {
Ember.run(application, 'destroy');
Ember.run(this.application, 'destroy');
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@ import Ember from 'ember';
import startApp from '../helpers/start-app';
import { module, test } from 'qunit';

var application;

module('default-development - Integration', {
beforeEach: function() {
application = startApp();
this.application = startApp();
},
afterEach: function() {
Ember.run(application, 'destroy');
Ember.run(this.application, 'destroy');
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@ import Ember from 'ember';
import startApp from '../helpers/start-app';
import { module, test } from 'qunit';

var application;

module('pods based templates', {
beforeEach: function() {
application = startApp();
this.application = startApp();
},
afterEach: function() {
Ember.run(application, 'destroy');
Ember.run(this.application, 'destroy');
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@ import Ember from 'ember';
import startApp from '../helpers/start-app';
import { module, test } from 'qunit';

var application;

module('pods based templates', {
beforeEach: function() {
application = startApp();
this.application = startApp();
},
afterEach: function() {
Ember.run(application, 'destroy');
Ember.run(this.application, 'destroy');
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@ import Ember from 'ember';
import startApp from '../helpers/start-app';
import { module, test } from 'qunit';

var application;

module('wrapInEval in-app test', {
beforeEach: function() {
application = startApp();
this.application = startApp();
},
afterEach: function() {
Ember.run(application, 'destroy');
Ember.run(this.application, 'destroy');
}
});

Expand Down
6 changes: 2 additions & 4 deletions tests/fixtures/generate/acceptance-test-expected.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@ import Ember from 'ember';
import { module, test } from 'qunit';
import startApp from 'my-app/tests/helpers/start-app';

var application;

module('Acceptance | foo', {
beforeEach: function() {
application = startApp();
this.application = startApp();
},

afterEach: function() {
Ember.run(application, 'destroy');
Ember.run(this.application, 'destroy');
}
});

Expand Down
6 changes: 2 additions & 4 deletions tests/fixtures/generate/addon-acceptance-test-expected.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@ import Ember from 'ember';
import { module, test } from 'qunit';
import startApp from '../../tests/helpers/start-app';

var application;

module('Acceptance | foo', {
beforeEach: function() {
application = startApp();
this.application = startApp();
},

afterEach: function() {
Ember.run(application, 'destroy');
Ember.run(this.application, 'destroy');
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@ import Ember from 'ember';
import { module, test } from 'qunit';
import startApp from '../../../tests/helpers/start-app';

var application;

module('Acceptance | foo/bar', {
beforeEach: function() {
application = startApp();
this.application = startApp();
},

afterEach: function() {
Ember.run(application, 'destroy');
Ember.run(this.application, 'destroy');
}
});

Expand Down

0 comments on commit 5766abb

Please sign in to comment.