From af7cd981d5de40956ff19f104bbbe14eff11adb2 Mon Sep 17 00:00:00 2001 From: James Kyle Date: Mon, 15 Jun 2015 15:28:14 -0700 Subject: [PATCH] Deprecate ArrayController. Resolves #11450 --- .../ember-application/tests/system/controller_test.js | 3 ++- packages/ember-htmlbars/tests/helpers/each_test.js | 4 +++- .../tests/integration/select_in_template_test.js | 4 +++- .../tests/helpers/element_action_test.js | 4 +++- .../ember-routing-htmlbars/tests/helpers/render_test.js | 4 +++- .../ember-routing/tests/system/controller_for_test.js | 4 +++- .../ember-runtime/lib/controllers/array_controller.js | 4 ++++ .../tests/controllers/array_controller_test.js | 8 +++++++- .../ember-runtime/tests/controllers/controller_test.js | 3 ++- .../tests/controllers/item_controller_class_test.js | 8 +++++++- packages/ember-runtime/tests/mixins/sortable_test.js | 5 ++++- .../tests/system/array_proxy/content_change_test.js | 3 ++- packages/ember-testing/tests/integration_test.js | 3 ++- packages/ember-views/tests/views/collection_test.js | 4 ++-- packages/ember/tests/helpers/link_to_test.js | 5 ++++- packages/ember/tests/homepage_example_test.js | 2 ++ packages/ember/tests/routing/basic_test.js | 7 +++++++ 17 files changed, 60 insertions(+), 15 deletions(-) diff --git a/packages/ember-application/tests/system/controller_test.js b/packages/ember-application/tests/system/controller_test.js index c463d2de879..87138ba62b7 100644 --- a/packages/ember-application/tests/system/controller_test.js +++ b/packages/ember-application/tests/system/controller_test.js @@ -5,7 +5,7 @@ import "ember-application/ext/controller"; import { Registry } from "ember-runtime/system/container"; import { A } from "ember-runtime/system/native_array"; -import ArrayController from "ember-runtime/controllers/array_controller"; +import ArrayController, { arrayControllerDeprecation } from "ember-runtime/controllers/array_controller"; import { computed } from "ember-metal/computed"; QUnit.module("Controller dependencies"); @@ -58,6 +58,7 @@ QUnit.test("If a controller specifies an unavailable dependency, it raises", fun }); QUnit.test("Mixin sets up controllers if there is needs before calling super", function() { + expectDeprecation(arrayControllerDeprecation); var registry = new Registry(); var container = registry.container(); diff --git a/packages/ember-htmlbars/tests/helpers/each_test.js b/packages/ember-htmlbars/tests/helpers/each_test.js index a12713e1fc7..f797c2992ca 100644 --- a/packages/ember-htmlbars/tests/helpers/each_test.js +++ b/packages/ember-htmlbars/tests/helpers/each_test.js @@ -5,7 +5,7 @@ import run from "ember-metal/run_loop"; import EmberView from "ember-views/views/view"; import LegacyEachView from "ember-views/views/legacy_each_view"; import { computed } from "ember-metal/computed"; -import ArrayController from "ember-runtime/controllers/array_controller"; +import ArrayController, { arrayControllerDeprecation } from "ember-runtime/controllers/array_controller"; import { A } from "ember-runtime/system/native_array"; import EmberController from "ember-runtime/controllers/controller"; import ObjectController from "ember-runtime/controllers/object_controller"; @@ -968,6 +968,7 @@ function testEachWithItem(moduleName, useBlockParams) { } QUnit.test("controller is assignable inside an #each", function() { + expectDeprecation(arrayControllerDeprecation); var controller = ArrayController.create({ model: A([{ name: "Adam" }, { name: "Steve" }]) }); @@ -1048,6 +1049,7 @@ function testEachWithItem(moduleName, useBlockParams) { }); QUnit.test("itemController specified in ArrayController with name binding does not change context", function() { + expectDeprecation(arrayControllerDeprecation); people = A([{ name: "Steve Holt" }, { name: "Annabelle" }]); var PersonController = EmberController.extend({ diff --git a/packages/ember-htmlbars/tests/integration/select_in_template_test.js b/packages/ember-htmlbars/tests/integration/select_in_template_test.js index 472dc13c3ca..59305d27287 100644 --- a/packages/ember-htmlbars/tests/integration/select_in_template_test.js +++ b/packages/ember-htmlbars/tests/integration/select_in_template_test.js @@ -5,7 +5,7 @@ import EventDispatcher from "ember-views/system/event_dispatcher"; import { computed } from "ember-metal/computed"; import Namespace from "ember-runtime/system/namespace"; -import ArrayController from "ember-runtime/controllers/array_controller"; +import ArrayController, { arrayControllerDeprecation } from "ember-runtime/controllers/array_controller"; import ArrayProxy from "ember-runtime/system/array_proxy"; import SelectView from "ember-views/views/select"; import compile from 'ember-template-compiler/system/compile'; @@ -26,6 +26,7 @@ QUnit.module("ember-htmlbars: Ember.Select - usage inside templates", { }); QUnit.test("works from a template with bindings [DEPRECATED]", function() { + expectDeprecation(arrayControllerDeprecation); var Person = EmberObject.extend({ id: null, firstName: null, @@ -88,6 +89,7 @@ QUnit.test("works from a template with bindings [DEPRECATED]", function() { }); QUnit.test("works from a template", function() { + expectDeprecation(arrayControllerDeprecation); var Person = EmberObject.extend({ id: null, firstName: null, diff --git a/packages/ember-routing-htmlbars/tests/helpers/element_action_test.js b/packages/ember-routing-htmlbars/tests/helpers/element_action_test.js index a1349261881..233730b68b4 100644 --- a/packages/ember-routing-htmlbars/tests/helpers/element_action_test.js +++ b/packages/ember-routing-htmlbars/tests/helpers/element_action_test.js @@ -8,7 +8,7 @@ import ActionManager from "ember-views/system/action_manager"; import { Registry } from "ember-runtime/system/container"; import EmberObject from "ember-runtime/system/object"; import EmberController from "ember-runtime/controllers/controller"; -import EmberArrayController from "ember-runtime/controllers/array_controller"; +import EmberArrayController, { arrayControllerDeprecation } from "ember-runtime/controllers/array_controller"; import compile from "ember-template-compiler/system/compile"; import EmberView from "ember-views/views/view"; @@ -132,6 +132,7 @@ QUnit.test("Inside a yield, the target points at the original target", function( }); QUnit.test("should target the current controller inside an {{each}} loop [DEPRECATED]", function() { + expectDeprecation(arrayControllerDeprecation); var registeredTarget; ActionHelper.registerAction = function({ node }) { @@ -196,6 +197,7 @@ QUnit.test("should target the with-controller inside an {{#with controller='pers QUnit.skip("should target the with-controller inside an {{each}} in a {{#with controller='person'}} [DEPRECATED]", function() { expectDeprecation(eachDeprecation); expectDeprecation('Using the context switching form of `{{with}}` is deprecated. Please use the keyword form (`{{with foo as bar}}`) instead.'); + expectDeprecation(arrayControllerDeprecation); var eventsCalled = []; diff --git a/packages/ember-routing-htmlbars/tests/helpers/render_test.js b/packages/ember-routing-htmlbars/tests/helpers/render_test.js index d5f9aa51039..e9e0f9d758c 100644 --- a/packages/ember-routing-htmlbars/tests/helpers/render_test.js +++ b/packages/ember-routing-htmlbars/tests/helpers/render_test.js @@ -6,7 +6,7 @@ import { observer } from 'ember-metal/mixin'; import Namespace from "ember-runtime/system/namespace"; import EmberController from "ember-runtime/controllers/controller"; -import EmberArrayController from "ember-runtime/controllers/array_controller"; +import EmberArrayController, { arrayControllerDeprecation } from "ember-runtime/controllers/array_controller"; import compile from "ember-template-compiler/system/compile"; @@ -213,6 +213,7 @@ QUnit.test("{{render}} helper should raise an error when a given controller name }); QUnit.test("{{render}} helper should render with given controller", function() { + expectDeprecation(arrayControllerDeprecation); var template = '{{render "home" controller="posts"}}'; var controller = EmberController.extend({ container: container }); var id = 0; @@ -421,6 +422,7 @@ QUnit.test("{{render}} helper should render templates both with and without mode }); QUnit.test("{{render}} helper should link child controllers to the parent controller", function() { + expectDeprecation(arrayControllerDeprecation); var parentTriggered = 0; var template = '

HI

{{render "posts"}}'; diff --git a/packages/ember-routing/tests/system/controller_for_test.js b/packages/ember-routing/tests/system/controller_for_test.js index 24d1cf8badf..803debf8ced 100644 --- a/packages/ember-routing/tests/system/controller_for_test.js +++ b/packages/ember-routing/tests/system/controller_for_test.js @@ -8,7 +8,7 @@ import Namespace from "ember-runtime/system/namespace"; import { classify } from "ember-runtime/system/string"; import Controller from "ember-runtime/controllers/controller"; import ObjectController from "ember-runtime/controllers/object_controller"; -import ArrayController from "ember-runtime/controllers/array_controller"; +import ArrayController, { arrayControllerDeprecation } from "ember-runtime/controllers/array_controller"; import controllerFor from "ember-routing/system/controller_for"; import generateController from "ember-routing/system/generate_controller"; import { @@ -103,6 +103,7 @@ QUnit.test("generateController should create Ember.ObjectController [DEPRECATED] }); QUnit.test("generateController should create Ember.ArrayController", function() { + expectDeprecation(arrayControllerDeprecation); var context = Ember.A(); var controller = generateController(container, 'home', context); @@ -130,6 +131,7 @@ QUnit.test("generateController should create App.ObjectController if provided", }); QUnit.test("generateController should create App.ArrayController if provided", function() { + expectDeprecation(arrayControllerDeprecation); var context = Ember.A(); var controller; namespace.ArrayController = ArrayController.extend(); diff --git a/packages/ember-runtime/lib/controllers/array_controller.js b/packages/ember-runtime/lib/controllers/array_controller.js index dcae0374c8f..9385f5439e0 100644 --- a/packages/ember-runtime/lib/controllers/array_controller.js +++ b/packages/ember-runtime/lib/controllers/array_controller.js @@ -13,6 +13,8 @@ import EmberError from 'ember-metal/error'; import EmberArray from 'ember-runtime/mixins/array'; import replace from 'ember-metal/replace'; +export var arrayControllerDeprecation = '`Ember.ArrayController` is deprecated.'; + /** `Ember.ArrayController` provides a way for you to publish a collection of objects so that you can easily bind to the collection from a Handlebars @@ -97,6 +99,7 @@ import replace from 'ember-metal/replace'; @extends Ember.ArrayProxy @uses Ember.SortableMixin @uses Ember.ControllerMixin + @deprecated @public */ @@ -199,6 +202,7 @@ export default ArrayProxy.extend(ControllerMixin, SortableMixin, { }, init() { + Ember.deprecate(arrayControllerDeprecation); this._super(...arguments); this._subControllers = []; }, diff --git a/packages/ember-runtime/tests/controllers/array_controller_test.js b/packages/ember-runtime/tests/controllers/array_controller_test.js index a1e4969314e..7e31c506454 100644 --- a/packages/ember-runtime/tests/controllers/array_controller_test.js +++ b/packages/ember-runtime/tests/controllers/array_controller_test.js @@ -1,6 +1,6 @@ import Ember from 'ember-metal/core'; import MutableArrayTests from 'ember-runtime/tests/suites/mutable_array'; -import ArrayController from "ember-runtime/controllers/array_controller"; +import ArrayController, { arrayControllerDeprecation } from "ember-runtime/controllers/array_controller"; import { set } from 'ember-metal/property_set'; import { get } from 'ember-metal/property_get'; @@ -11,6 +11,7 @@ MutableArrayTests.extend({ newObject(ary) { var ret = ary ? ary.slice() : this.newFixture(3); + expectDeprecation(arrayControllerDeprecation); return ArrayController.create({ model: Ember.A(ret) }); @@ -28,6 +29,7 @@ MutableArrayTests.extend({ QUnit.module("ember-runtime: array_controller"); QUnit.test("defaults its `model` to an empty array", function () { + expectDeprecation(arrayControllerDeprecation); var Controller = ArrayController.extend(); deepEqual(Controller.create().get("model"), [], "`ArrayController` defaults its model to an empty array"); equal(Controller.create().get('firstObject'), undefined, 'can fetch firstObject'); @@ -35,12 +37,14 @@ QUnit.test("defaults its `model` to an empty array", function () { }); QUnit.test("Ember.ArrayController length property works even if model was not set initially", function() { + expectDeprecation(arrayControllerDeprecation); var controller = ArrayController.create(); controller.pushObject('item'); equal(controller.get('length'), 1); }); QUnit.test('works properly when model is set to an Ember.A()', function() { + expectDeprecation(arrayControllerDeprecation); var controller = ArrayController.create(); set(controller, 'model', Ember.A(['red', 'green'])); @@ -49,6 +53,7 @@ QUnit.test('works properly when model is set to an Ember.A()', function() { }); QUnit.test('works properly when model is set to a plain array', function() { + expectDeprecation(arrayControllerDeprecation); var controller = ArrayController.create(); if (Ember.EXTEND_PROTOTYPES) { @@ -63,6 +68,7 @@ QUnit.test('works properly when model is set to a plain array', function() { }); QUnit.test('works properly when model is set to `null`', function() { + expectDeprecation(arrayControllerDeprecation); var controller = ArrayController.create(); set(controller, 'model', null); diff --git a/packages/ember-runtime/tests/controllers/controller_test.js b/packages/ember-runtime/tests/controllers/controller_test.js index 2b7f8cd3c66..2074d211b8e 100644 --- a/packages/ember-runtime/tests/controllers/controller_test.js +++ b/packages/ember-runtime/tests/controllers/controller_test.js @@ -3,7 +3,7 @@ import Controller from "ember-runtime/controllers/controller"; import Service from "ember-runtime/system/service"; import ObjectController from "ember-runtime/controllers/object_controller"; -import ArrayController from "ember-runtime/controllers/array_controller"; +import ArrayController, { arrayControllerDeprecation } from "ember-runtime/controllers/array_controller"; import { objectControllerDeprecation } from "ember-runtime/controllers/object_controller"; @@ -243,6 +243,7 @@ QUnit.test("controllers can be injected into ObjectControllers", function() { }); QUnit.test("controllers can be injected into ArrayControllers", function() { + expectDeprecation(arrayControllerDeprecation); var registry = new Registry(); var container = registry.container(); diff --git a/packages/ember-runtime/tests/controllers/item_controller_class_test.js b/packages/ember-runtime/tests/controllers/item_controller_class_test.js index 5cad36751a6..48181002202 100644 --- a/packages/ember-runtime/tests/controllers/item_controller_class_test.js +++ b/packages/ember-runtime/tests/controllers/item_controller_class_test.js @@ -5,7 +5,7 @@ import {get} from "ember-metal/property_get"; import {computed} from "ember-metal/computed"; import compare from "ember-runtime/compare"; import EmberObject from "ember-runtime/system/object"; -import ArrayController from "ember-runtime/controllers/array_controller"; +import ArrayController, { arrayControllerDeprecation } from "ember-runtime/controllers/array_controller"; import Controller from "ember-runtime/controllers/controller"; import {sort} from "ember-runtime/computed/reduce_computed_macros"; import Registry from "container/registry"; @@ -54,6 +54,7 @@ QUnit.module("Ember.ArrayController - itemController", { }); function createUnwrappedArrayController() { + expectDeprecation(arrayControllerDeprecation); arrayController = ArrayController.create({ container: container, model: lannisters @@ -61,6 +62,7 @@ function createUnwrappedArrayController() { } function createArrayController() { + expectDeprecation(arrayControllerDeprecation); arrayController = ArrayController.create({ container: container, itemController: 'Item', @@ -69,6 +71,7 @@ function createArrayController() { } function createDynamicArrayController() { + expectDeprecation(arrayControllerDeprecation); arrayController = ArrayController.create({ container: container, lookupItemController(object) { @@ -238,6 +241,7 @@ QUnit.test("`itemController` can be dynamic by overwriting `lookupItemController }); QUnit.test("when `idx` is out of range, `lookupItemController` is not called", function() { + expectDeprecation(arrayControllerDeprecation); arrayController = ArrayController.create({ container: container, lookupItemController(object) { @@ -251,6 +255,7 @@ QUnit.test("when `idx` is out of range, `lookupItemController` is not called", f }); QUnit.test("if `lookupItemController` returns a string, it must be resolvable by the container", function() { + expectDeprecation(arrayControllerDeprecation); arrayController = ArrayController.create({ container: container, lookupItemController(object) { @@ -267,6 +272,7 @@ QUnit.test("if `lookupItemController` returns a string, it must be resolvable by }); QUnit.test("target and parentController are set to the concrete parentController", function() { + expectDeprecation(arrayControllerDeprecation); var parent = ArrayController.create({ }); diff --git a/packages/ember-runtime/tests/mixins/sortable_test.js b/packages/ember-runtime/tests/mixins/sortable_test.js index cedd5f66cda..a3d3bdfe481 100644 --- a/packages/ember-runtime/tests/mixins/sortable_test.js +++ b/packages/ember-runtime/tests/mixins/sortable_test.js @@ -6,7 +6,7 @@ import {listenersFor} from "ember-metal/events"; import ArrayProxy from "ember-runtime/system/array_proxy"; import SortableMixin from "ember-runtime/mixins/sortable"; import EmberObject from "ember-runtime/system/object"; -import ArrayController from "ember-runtime/controllers/array_controller"; +import ArrayController, { arrayControllerDeprecation } from "ember-runtime/controllers/array_controller"; var unsortedArray, sortedArrayController; @@ -159,6 +159,7 @@ QUnit.module("Ember.Sortable with content and sortProperties", { unsortedArray = Ember.A(Ember.A(array).copy()); + expectDeprecation(arrayControllerDeprecation); sortedArrayController = ArrayController.create({ content: unsortedArray, sortProperties: ['name'] @@ -281,6 +282,7 @@ QUnit.test("sortProperties observers removed on content removal", function() { QUnit.module("Ember.Sortable with sortProperties", { setup() { run(function() { + expectDeprecation(arrayControllerDeprecation); sortedArrayController = ArrayController.create({ sortProperties: ['name'] }); @@ -310,6 +312,7 @@ QUnit.test("you can set content later and it will be sorted", function() { QUnit.module("Ember.Sortable with sortFunction and sortProperties", { setup() { run(function() { + expectDeprecation(arrayControllerDeprecation); sortedArrayController = ArrayController.create({ sortProperties: ['name'], sortFunction(v, w) { diff --git a/packages/ember-runtime/tests/system/array_proxy/content_change_test.js b/packages/ember-runtime/tests/system/array_proxy/content_change_test.js index dd8fd0ed942..f39fce08e1f 100644 --- a/packages/ember-runtime/tests/system/array_proxy/content_change_test.js +++ b/packages/ember-runtime/tests/system/array_proxy/content_change_test.js @@ -2,7 +2,7 @@ import Ember from "ember-metal/core"; import {set} from "ember-metal/property_set"; import run from "ember-metal/run_loop"; import ArrayProxy from "ember-runtime/system/array_proxy"; -import ArrayController from "ember-runtime/controllers/array_controller"; +import ArrayController, { arrayControllerDeprecation } from "ember-runtime/controllers/array_controller"; QUnit.module("ArrayProxy - content change"); @@ -69,6 +69,7 @@ QUnit.test("The `arrangedContentDidChange` method is invoked after `content` is }); QUnit.test("The ArrayProxy doesn't explode when assigned a destroyed object", function() { + expectDeprecation(arrayControllerDeprecation); var arrayController = ArrayController.create(); var proxy = ArrayProxy.create(); diff --git a/packages/ember-testing/tests/integration_test.js b/packages/ember-testing/tests/integration_test.js index 10d7dc2a121..00c36530a53 100644 --- a/packages/ember-testing/tests/integration_test.js +++ b/packages/ember-testing/tests/integration_test.js @@ -1,7 +1,7 @@ import Ember from "ember-metal/core"; import run from "ember-metal/run_loop"; import EmberObject from "ember-runtime/system/object"; -import ArrayController from "ember-runtime/controllers/array_controller"; +import ArrayController, { arrayControllerDeprecation } from "ember-runtime/controllers/array_controller"; import jQuery from "ember-views/system/jquery"; import EmberView from "ember-views/views/view"; import Test from "ember-testing/test"; @@ -86,6 +86,7 @@ QUnit.test("template is bound to empty array of people", function() { }); QUnit.test("template is bound to array of 2 people", function() { + expectDeprecation(arrayControllerDeprecation); App.Person.find = function() { var people = Ember.A(); var first = App.Person.create({ firstName: "x" }); diff --git a/packages/ember-views/tests/views/collection_test.js b/packages/ember-views/tests/views/collection_test.js index 01645ccff0c..c18e4ef075d 100644 --- a/packages/ember-views/tests/views/collection_test.js +++ b/packages/ember-views/tests/views/collection_test.js @@ -4,7 +4,7 @@ import run from "ember-metal/run_loop"; import { Mixin } from "ember-metal/mixin"; import { fmt } from "ember-runtime/system/string"; import ArrayProxy from "ember-runtime/system/array_proxy"; -import ArrayController from "ember-runtime/controllers/array_controller"; +import ArrayController, { arrayControllerDeprecation } from "ember-runtime/controllers/array_controller"; import jQuery from "ember-views/system/jquery"; import CollectionView from "ember-views/views/collection_view"; import View from "ember-views/views/view"; @@ -506,7 +506,7 @@ QUnit.test("should not render the emptyView if content is emptied and refilled i }); QUnit.test("a array_proxy that backs an sorted array_controller that backs a collection view functions properly", function() { - + expectDeprecation(arrayControllerDeprecation); var array = Ember.A([{ name: "Other Katz" }]); var arrayProxy = ArrayProxy.create({ content: array }); diff --git a/packages/ember/tests/helpers/link_to_test.js b/packages/ember/tests/helpers/link_to_test.js index 6cceba9dd68..9060b054ebd 100644 --- a/packages/ember/tests/helpers/link_to_test.js +++ b/packages/ember/tests/helpers/link_to_test.js @@ -4,6 +4,7 @@ import isEnabled from "ember-metal/features"; import { objectControllerDeprecation } from "ember-runtime/controllers/object_controller"; import EmberHandlebars from "ember-htmlbars/compat"; import EmberView from "ember-views/views/view"; +import { arrayControllerDeprecation } from "ember-runtime/controllers/array_controller"; var compile = EmberHandlebars.compile; @@ -440,6 +441,7 @@ QUnit.test("The {{link-to}} helper supports bubbles=false", function() { }); QUnit.test("The {{link-to}} helper moves into the named route with context", function() { + expectDeprecation(arrayControllerDeprecation); Router.map(function(match) { this.route("about"); this.resource("item", { path: "/item/:id" }); @@ -1027,7 +1029,8 @@ QUnit.test("The non-block form {{link-to}} helper updates the link text when it }); QUnit.test("The non-block form {{link-to}} helper moves into the named route with context", function() { - expect(5); + expect(6); + expectDeprecation(arrayControllerDeprecation); Router.map(function(match) { this.route("item", { path: "/item/:id" }); }); diff --git a/packages/ember/tests/homepage_example_test.js b/packages/ember/tests/homepage_example_test.js index 9f29b9f0461..70f68e6a713 100644 --- a/packages/ember/tests/homepage_example_test.js +++ b/packages/ember/tests/homepage_example_test.js @@ -1,6 +1,7 @@ import "ember"; import EmberHandlebars from "ember-htmlbars/compat"; +import { arrayControllerDeprecation } from "ember-runtime/controllers/array_controller"; var compile = EmberHandlebars.compile; @@ -23,6 +24,7 @@ function setupExample() { App.IndexRoute = Ember.Route.extend({ model() { + expectDeprecation(arrayControllerDeprecation); var people = Ember.A([ App.Person.create({ firstName: "Tom", diff --git a/packages/ember/tests/routing/basic_test.js b/packages/ember/tests/routing/basic_test.js index 04324bc38dd..accb4e6d867 100644 --- a/packages/ember/tests/routing/basic_test.js +++ b/packages/ember/tests/routing/basic_test.js @@ -4,6 +4,7 @@ import { get } from "ember-metal/property_get"; import { set } from "ember-metal/property_set"; import ActionManager from "ember-views/system/action_manager"; import EmberView from "ember-views/views/view"; +import { arrayControllerDeprecation } from "ember-runtime/controllers/array_controller"; import EmberHandlebars from "ember-htmlbars/compat"; @@ -626,6 +627,8 @@ QUnit.test("The Homepage with a `setupController` hook modifying other controlle }); QUnit.test("The Homepage with a computed context that does not get overridden", function() { + expectDeprecation(arrayControllerDeprecation); + Router.map(function() { this.route("home", { path: "/" }); }); @@ -650,6 +653,8 @@ QUnit.test("The Homepage with a computed context that does not get overridden", }); QUnit.test("The Homepage getting its controller context via model", function() { + expectDeprecation(arrayControllerDeprecation); + Router.map(function() { this.route("home", { path: "/" }); }); @@ -2283,6 +2288,8 @@ QUnit.test("Nested index route is not overriden by parent's implicit index route }); QUnit.test("Application template does not duplicate when re-rendered", function() { + expectDeprecation(arrayControllerDeprecation); + Ember.TEMPLATES.application = compile("

I Render Once

{{outlet}}"); Router.map(function() {