Skip to content

Commit 7bda144

Browse files
committed
Standard test handling of Ember.TEMPLATES teardown
1 parent 3e32bad commit 7bda144

File tree

9 files changed

+17
-17
lines changed

9 files changed

+17
-17
lines changed

Gemfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
GIT
22
remote: https://github.com/emberjs/ember-dev.git
3-
revision: e847d56ee6aa86076471bce65b3505f72682013c
3+
revision: 600c5e6e0fd60903ad9cdc79839d338c7f994ec7
44
branch: master
55
specs:
66
ember-dev (0.1)
@@ -32,7 +32,7 @@ PATH
3232
GEM
3333
remote: https://rubygems.org/
3434
specs:
35-
aws-sdk (1.16.0)
35+
aws-sdk (1.16.1)
3636
json (~> 1.4)
3737
nokogiri (< 1.6.0)
3838
uuidtools (~> 2.1)
@@ -52,7 +52,7 @@ GEM
5252
rb-fsevent (>= 0.9.3)
5353
rb-inotify (>= 0.9)
5454
rb-kqueue (>= 0.2)
55-
mime-types (1.24)
55+
mime-types (1.25)
5656
multi_json (1.7.9)
5757
nokogiri (1.5.10)
5858
posix-spawn (0.3.6)

packages/ember-application/tests/system/application_test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ var app;
9292

9393
module("Ember.Application initialization", {
9494
teardown: function() {
95-
Ember.TEMPLATES = {};
9695
Ember.run(app, 'destroy');
96+
Ember.TEMPLATES = {};
9797
}
9898
});
9999

packages/ember-application/tests/system/dependency_injection/default_resolver_test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ module("Ember.Application Depedency Injection", {
99
},
1010

1111
teardown: function() {
12+
Ember.TEMPLATES = {};
1213
Ember.lookup = originalLookup;
1314
Ember.run(application, 'destroy');
1415
}
@@ -26,7 +27,7 @@ test('the default resolver can look things up in other namespaces', function() {
2627
test('the default resolver looks up templates in Ember.TEMPLATES', function() {
2728
function fooTemplate() {}
2829
function fooBarTemplate() {}
29-
function fooBarBazTemplate() {}
30+
function fooBarBazTemplate() {}
3031

3132
Ember.TEMPLATES['foo'] = fooTemplate;
3233
Ember.TEMPLATES['fooBar'] = fooBarTemplate;

packages/ember-routing/tests/helpers/render_test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ module("Handlebars {{render}} helper", {
6666
view.destroy();
6767
}
6868
});
69+
70+
Ember.TEMPLATES = {};
6971
}
7072
});
7173

packages/ember-testing/tests/helpers_test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ module("ember-testing Helpers", {
55
Ember.run(App, App.destroy);
66
App.removeTestHelpers();
77
App = null;
8+
Ember.TEMPLATES = {};
89
}
910
});
1011

packages/ember/tests/component_registration_test.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
var App, container, originalTemplates;
1+
var App, container;
22
var compile = Ember.Handlebars.compile;
33

44
module("Application Lifecycle - Component Registration", {
55
setup: function() {
6-
originalTemplates = Ember.$.extend({}, Ember.TEMPLATES);
76
Ember.TEMPLATES["components/expand-it"] = compile("<p>hello {{yield}}</p>");
87
Ember.TEMPLATES.application = compile("Hello world {{#expand-it}}world{{/expand-it}}");
98
},
@@ -12,7 +11,7 @@ module("Application Lifecycle - Component Registration", {
1211
Ember.run(function() {
1312
App.destroy();
1413
App = null;
15-
Ember.TEMPLATES = originalTemplates;
14+
Ember.TEMPLATES = {};
1615
});
1716
}
1817
});

packages/ember/tests/helpers/link_to_test.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var Router, App, AppView, templates, router, eventDispatcher, container, originalTemplates;
1+
var Router, App, AppView, templates, router, eventDispatcher, container;
22
var get = Ember.get, set = Ember.set;
33

44
function bootApplication() {
@@ -31,7 +31,6 @@ module("The {{link-to}} helper", {
3131

3232
Router = App.Router;
3333

34-
originalTemplates = Ember.$.extend({}, Ember.TEMPLATES);
3534
Ember.TEMPLATES.app = Ember.Handlebars.compile("{{outlet}}");
3635
Ember.TEMPLATES.index = Ember.Handlebars.compile("<h3>Home</h3>{{#link-to 'about' id='about-link'}}About{{/link-to}}{{#link-to 'index' id='self-link'}}Self{{/link-to}}");
3736
Ember.TEMPLATES.about = Ember.Handlebars.compile("<h3>About</h3>{{#link-to 'index' id='home-link'}}Home{{/link-to}}{{#link-to 'about' id='self-link'}}Self{{/link-to}}");
@@ -50,7 +49,7 @@ module("The {{link-to}} helper", {
5049

5150
teardown: function() {
5251
Ember.run(function() { App.destroy(); });
53-
Ember.TEMPLATES = originalTemplates;
52+
Ember.TEMPLATES = {};
5453
}
5554
});
5655

packages/ember/tests/homepage_example_test.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var App, originalTemplates, $fixture;
1+
var App, $fixture;
22

33
function setupExample() {
44
// setup templates
@@ -46,7 +46,6 @@ module("Homepage Example", {
4646
});
4747

4848
App.LoadingRoute = Ember.Route.extend();
49-
originalTemplates = Ember.$.extend({}, Ember.TEMPLATES);
5049
});
5150

5251
$fixture = Ember.$('#qunit-fixture');
@@ -61,7 +60,7 @@ module("Homepage Example", {
6160
App.destroy();
6261
App = null;
6362

64-
Ember.TEMPLATES = originalTemplates;
63+
Ember.TEMPLATES = {};
6564
});
6665
}
6766
});

packages/ember/tests/routing/basic_test.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var Router, App, AppView, templates, router, container, originalTemplates;
1+
var Router, App, AppView, templates, router, container;
22
var get = Ember.get, set = Ember.set;
33

44
function bootApplication() {
@@ -63,7 +63,6 @@ module("Basic Routing", {
6363

6464
container = App.__container__;
6565

66-
originalTemplates = Ember.$.extend({}, Ember.TEMPLATES);
6766
Ember.TEMPLATES.application = compile("{{outlet}}");
6867
Ember.TEMPLATES.home = compile("<h3>Hours</h3>");
6968
Ember.TEMPLATES.homepage = compile("<h3>Megatroll</h3><p>{{home}}</p>");
@@ -76,7 +75,7 @@ module("Basic Routing", {
7675
App.destroy();
7776
App = null;
7877

79-
Ember.TEMPLATES = originalTemplates;
78+
Ember.TEMPLATES = {};
8079
});
8180
}
8281
});

0 commit comments

Comments
 (0)