Skip to content

Commit

Permalink
Instance-initializer blueprint: destroy instance before application
Browse files Browse the repository at this point in the history
  • Loading branch information
simonihmig committed Mar 7, 2019
1 parent 4cad151 commit bff547d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ module('<%= friendlyTestName %>', function(hooks) {
this.instance = this.application.buildInstance();
});
hooks.afterEach(function() {
<% if (destroyAppExists) { %>destroyApp(this.application);<% } else { %>run(this.application, 'destroy');<% } %>
<% if (destroyAppExists) { %>destroyApp(this.instance);<% } else { %>run(this.instance, 'destroy');<% } %>
<% if (destroyAppExists) { %>destroyApp(this.application);<% } else { %>run(this.application, 'destroy');<% } %>
});

// Replace this with your real tests.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ module('Unit | Instance Initializer | foo', function(hooks) {
this.instance = this.application.buildInstance();
});
hooks.afterEach(function() {
run(this.application, 'destroy');
run(this.instance, 'destroy');
run(this.application, 'destroy');
});

// Replace this with your real tests.
Expand Down
2 changes: 1 addition & 1 deletion node-tests/fixtures/instance-initializer-test/rfc232.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ module('Unit | Instance Initializer | foo', function(hooks) {
this.instance = this.application.buildInstance();
});
hooks.afterEach(function() {
run(this.application, 'destroy');
run(this.instance, 'destroy');
run(this.application, 'destroy');
});

// Replace this with your real tests.
Expand Down

0 comments on commit bff547d

Please sign in to comment.