ember-source 1.11.0.beta.1 → 1.11.0.beta.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of ember-source might be problematic. Click here for more details.

@@ -5,7 +5,7 @@
5
5
  * Portions Copyright 2008-2011 Apple Inc. All rights reserved.
6
6
  * @license Licensed under MIT license
7
7
  * See https://raw.github.com/emberjs/ember.js/master/LICENSE
8
- * @version 1.11.0-beta.1
8
+ * @version 1.11.0-beta.2
9
9
  */
10
10
 
11
11
  (function() {
@@ -297,10 +297,7 @@ enifed('ember-debug', ['exports', 'ember-metal/core', 'ember-metal/error', 'embe
297
297
  Ember['default'].FEATURES['features-stripped-test'] = true;
298
298
  var featuresWereStripped = true;
299
299
 
300
- if (Ember['default'].FEATURES.isEnabled('features-stripped-test')) {
301
- featuresWereStripped = false;
302
- }
303
-
300
+
304
301
  delete Ember['default'].FEATURES['features-stripped-test'];
305
302
  _warnIfUsingStrippedFeatureFlags(Ember['default'].ENV.FEATURES, featuresWereStripped);
306
303
 
@@ -703,44 +700,7 @@ enifed('ember-testing/helpers', ['ember-metal/core', 'ember-metal/property_get',
703
700
  */
704
701
  asyncHelper('click', click);
705
702
 
706
- if (Ember['default'].FEATURES.isEnabled('ember-testing-checkbox-helpers')) {
707
- /**
708
- * Checks a checkbox. Ensures the presence of the `checked` attribute
709
- *
710
- * Example:
711
- *
712
- * ```javascript
713
- * check('#remember-me').then(function() {
714
- * // assert something
715
- * });
716
- * ```
717
- *
718
- * @method check
719
- * @param {String} selector jQuery selector finding an `input[type="checkbox"]`
720
- * element on the DOM to check
721
- * @return {RSVP.Promise}
722
- */
723
- asyncHelper('check', check);
724
-
725
703
  /**
726
- * Unchecks a checkbox. Ensures the absence of the `checked` attribute
727
- *
728
- * Example:
729
- *
730
- * ```javascript
731
- * uncheck('#remember-me').then(function() {
732
- * // assert something
733
- * });
734
- * ```
735
- *
736
- * @method check
737
- * @param {String} selector jQuery selector finding an `input[type="checkbox"]`
738
- * element on the DOM to uncheck
739
- * @return {RSVP.Promise}
740
- */
741
- asyncHelper('uncheck', uncheck);
742
- }
743
- /**
744
704
  * Simulates a key event, e.g. `keypress`, `keydown`, `keyup` with the desired keyCode
745
705
  *
746
706
  * Example:
@@ -5,7 +5,7 @@
5
5
  * Portions Copyright 2008-2011 Apple Inc. All rights reserved.
6
6
  * @license Licensed under MIT license
7
7
  * See https://raw.github.com/emberjs/ember.js/master/LICENSE
8
- * @version 1.11.0-beta.1
8
+ * @version 1.11.0-beta.2
9
9
  */
10
10
 
11
11
  (function() {
@@ -1904,12 +1904,6 @@ enifed('ember-application/tests/system/dependency_injection/default_resolver_tes
1904
1904
  helpers.registerHelper('fooresolvertest', fooresolvertestHelper);
1905
1905
  helpers.registerHelper('bar-baz-resolver-test', barBazResolverTestHelper);
1906
1906
 
1907
- var retrievedFooResolverTestHelper, retrievedBarBazResolverTestHelper;
1908
-
1909
-
1910
- retrievedFooResolverTestHelper = locator.lookup('helper:fooresolvertest').helperFunction;
1911
- retrievedBarBazResolverTestHelper = locator.lookup('helper:bar-baz-resolver-test').helperFunction;
1912
-
1913
1907
  fooresolvertestHelper();
1914
1908
  barBazResolverTestHelper();
1915
1909
  });
@@ -2581,28 +2575,7 @@ enifed('ember-application/tests/system/initializers_test', ['ember-metal/run_loo
2581
2575
  });
2582
2576
  });
2583
2577
 
2584
- if (Ember.FEATURES.isEnabled("ember-application-initializer-context")) {
2585
- QUnit.test("initializers should be executed in their own context", function() {
2586
- expect(1);
2587
- var MyApplication = Application['default'].extend();
2588
-
2589
- MyApplication.initializer({
2590
- name: 'coolBabeInitializer',
2591
- myProperty: 'coolBabe',
2592
- initialize: function(registry, application) {
2593
- equal(this.myProperty, 'coolBabe', 'should have access to its own context');
2594
- }
2595
- });
2596
-
2597
- run['default'](function() {
2598
- app = MyApplication.create({
2599
- router: false,
2600
- rootElement: '#qunit-fixture'
2601
- });
2602
- });
2603
- });
2604
- }
2605
-
2578
+
2606
2579
  });
2607
2580
  enifed('ember-application/tests/system/initializers_test.jscs-test', function () {
2608
2581
 
@@ -2628,349 +2601,10 @@ enifed('ember-application/tests/system/instance_initializers_test', ['ember-meta
2628
2601
 
2629
2602
  'use strict';
2630
2603
 
2631
- var app;
2632
-
2633
- if (Ember.FEATURES.isEnabled('ember-application-instance-initializers')) {
2634
- QUnit.module("Ember.Application instance initializers", {
2635
- setup: function() {
2636
- },
2637
-
2638
- teardown: function() {
2639
- if (app) {
2640
- run['default'](function() { app.destroy(); });
2641
- }
2642
- }
2643
- });
2644
-
2645
- QUnit.test("initializers require proper 'name' and 'initialize' properties", function() {
2646
- var MyApplication = Application['default'].extend();
2647
-
2648
- expectAssertion(function() {
2649
- run['default'](function() {
2650
- MyApplication.instanceInitializer({ name: 'initializer' });
2651
- });
2652
- });
2653
-
2654
- expectAssertion(function() {
2655
- run['default'](function() {
2656
- MyApplication.instanceInitializer({ initialize: Ember.K });
2657
- });
2658
- });
2659
-
2660
- });
2661
-
2662
- QUnit.test("initializers are passed an app instance", function() {
2663
- var MyApplication = Application['default'].extend();
2664
-
2665
- MyApplication.instanceInitializer({
2666
- name: 'initializer',
2667
- initialize: function(instance) {
2668
- ok(instance instanceof ApplicationInstance['default'], "initialize is passed an application instance");
2669
- }
2670
- });
2671
-
2672
- run['default'](function() {
2673
- app = MyApplication.create({
2674
- router: false,
2675
- rootElement: '#qunit-fixture'
2676
- });
2677
- });
2678
- });
2679
-
2680
- QUnit.test("initializers can be registered in a specified order", function() {
2681
- var order = [];
2682
- var MyApplication = Application['default'].extend();
2683
- MyApplication.instanceInitializer({
2684
- name: 'fourth',
2685
- after: 'third',
2686
- initialize: function(registry) {
2687
- order.push('fourth');
2688
- }
2689
- });
2690
-
2691
- MyApplication.instanceInitializer({
2692
- name: 'second',
2693
- after: 'first',
2694
- before: 'third',
2695
- initialize: function(registry) {
2696
- order.push('second');
2697
- }
2698
- });
2699
-
2700
- MyApplication.instanceInitializer({
2701
- name: 'fifth',
2702
- after: 'fourth',
2703
- before: 'sixth',
2704
- initialize: function(registry) {
2705
- order.push('fifth');
2706
- }
2707
- });
2708
-
2709
- MyApplication.instanceInitializer({
2710
- name: 'first',
2711
- before: 'second',
2712
- initialize: function(registry) {
2713
- order.push('first');
2714
- }
2715
- });
2716
-
2717
- MyApplication.instanceInitializer({
2718
- name: 'third',
2719
- initialize: function(registry) {
2720
- order.push('third');
2721
- }
2722
- });
2723
-
2724
- MyApplication.instanceInitializer({
2725
- name: 'sixth',
2726
- initialize: function(registry) {
2727
- order.push('sixth');
2728
- }
2729
- });
2730
-
2731
- run['default'](function() {
2732
- app = MyApplication.create({
2733
- router: false,
2734
- rootElement: '#qunit-fixture'
2735
- });
2736
- });
2737
-
2738
- deepEqual(order, ['first', 'second', 'third', 'fourth', 'fifth', 'sixth']);
2739
- });
2740
-
2741
- QUnit.test("initializers can be registered in a specified order as an array", function() {
2742
- var order = [];
2743
- var MyApplication = Application['default'].extend();
2744
-
2745
-
2746
- MyApplication.instanceInitializer({
2747
- name: 'third',
2748
- initialize: function(registry) {
2749
- order.push('third');
2750
- }
2751
- });
2752
-
2753
- MyApplication.instanceInitializer({
2754
- name: 'second',
2755
- after: 'first',
2756
- before: ['third', 'fourth'],
2757
- initialize: function(registry) {
2758
- order.push('second');
2759
- }
2760
- });
2761
-
2762
- MyApplication.instanceInitializer({
2763
- name: 'fourth',
2764
- after: ['second', 'third'],
2765
- initialize: function(registry) {
2766
- order.push('fourth');
2767
- }
2768
- });
2769
-
2770
- MyApplication.instanceInitializer({
2771
- name: 'fifth',
2772
- after: 'fourth',
2773
- before: 'sixth',
2774
- initialize: function(registry) {
2775
- order.push('fifth');
2776
- }
2777
- });
2778
-
2779
- MyApplication.instanceInitializer({
2780
- name: 'first',
2781
- before: ['second'],
2782
- initialize: function(registry) {
2783
- order.push('first');
2784
- }
2785
- });
2786
-
2787
- MyApplication.instanceInitializer({
2788
- name: 'sixth',
2789
- initialize: function(registry) {
2790
- order.push('sixth');
2791
- }
2792
- });
2793
-
2794
- run['default'](function() {
2795
- app = MyApplication.create({
2796
- router: false,
2797
- rootElement: '#qunit-fixture'
2798
- });
2799
- });
2800
-
2801
- deepEqual(order, ['first', 'second', 'third', 'fourth', 'fifth', 'sixth']);
2802
- });
2803
-
2804
- QUnit.test("initializers can have multiple dependencies", function () {
2805
- var order = [];
2806
- var a = {
2807
- name: "a",
2808
- before: "b",
2809
- initialize: function(registry) {
2810
- order.push('a');
2811
- }
2812
- };
2813
- var b = {
2814
- name: "b",
2815
- initialize: function(registry) {
2816
- order.push('b');
2817
- }
2818
- };
2819
- var c = {
2820
- name: "c",
2821
- after: "b",
2822
- initialize: function(registry) {
2823
- order.push('c');
2824
- }
2825
- };
2826
- var afterB = {
2827
- name: "after b",
2828
- after: "b",
2829
- initialize: function(registry) {
2830
- order.push("after b");
2831
- }
2832
- };
2833
- var afterC = {
2834
- name: "after c",
2835
- after: "c",
2836
- initialize: function(registry) {
2837
- order.push("after c");
2838
- }
2839
- };
2840
-
2841
- Application['default'].instanceInitializer(b);
2842
- Application['default'].instanceInitializer(a);
2843
- Application['default'].instanceInitializer(afterC);
2844
- Application['default'].instanceInitializer(afterB);
2845
- Application['default'].instanceInitializer(c);
2846
-
2847
- run['default'](function() {
2848
- app = Application['default'].create({
2849
- router: false,
2850
- rootElement: '#qunit-fixture'
2851
- });
2852
- });
2853
-
2854
- ok(array.indexOf.call(order, a.name) < array.indexOf.call(order, b.name), 'a < b');
2855
- ok(array.indexOf.call(order, b.name) < array.indexOf.call(order, c.name), 'b < c');
2856
- ok(array.indexOf.call(order, b.name) < array.indexOf.call(order, afterB.name), 'b < afterB');
2857
- ok(array.indexOf.call(order, c.name) < array.indexOf.call(order, afterC.name), 'c < afterC');
2858
- });
2859
-
2860
- QUnit.test("initializers set on Application subclasses should not be shared between apps", function() {
2861
- var firstInitializerRunCount = 0;
2862
- var secondInitializerRunCount = 0;
2863
- var FirstApp = Application['default'].extend();
2864
- FirstApp.instanceInitializer({
2865
- name: 'first',
2866
- initialize: function(registry) {
2867
- firstInitializerRunCount++;
2868
- }
2869
- });
2870
- var SecondApp = Application['default'].extend();
2871
- SecondApp.instanceInitializer({
2872
- name: 'second',
2873
- initialize: function(registry) {
2874
- secondInitializerRunCount++;
2875
- }
2876
- });
2877
- jQuery['default']('#qunit-fixture').html('<div id="first"></div><div id="second"></div>');
2878
- run['default'](function() {
2879
- FirstApp.create({
2880
- router: false,
2881
- rootElement: '#qunit-fixture #first'
2882
- });
2883
- });
2884
- equal(firstInitializerRunCount, 1, 'first initializer only was run');
2885
- equal(secondInitializerRunCount, 0, 'first initializer only was run');
2886
- run['default'](function() {
2887
- SecondApp.create({
2888
- router: false,
2889
- rootElement: '#qunit-fixture #second'
2890
- });
2891
- });
2892
- equal(firstInitializerRunCount, 1, 'second initializer only was run');
2893
- equal(secondInitializerRunCount, 1, 'second initializer only was run');
2894
- });
2895
-
2896
- QUnit.test("initializers are concatenated", function() {
2897
- var firstInitializerRunCount = 0;
2898
- var secondInitializerRunCount = 0;
2899
- var FirstApp = Application['default'].extend();
2900
- FirstApp.instanceInitializer({
2901
- name: 'first',
2902
- initialize: function(registry) {
2903
- firstInitializerRunCount++;
2904
- }
2905
- });
2906
-
2907
- var SecondApp = FirstApp.extend();
2908
- SecondApp.instanceInitializer({
2909
- name: 'second',
2910
- initialize: function(registry) {
2911
- secondInitializerRunCount++;
2912
- }
2913
- });
2914
-
2915
- jQuery['default']('#qunit-fixture').html('<div id="first"></div><div id="second"></div>');
2916
- run['default'](function() {
2917
- FirstApp.create({
2918
- router: false,
2919
- rootElement: '#qunit-fixture #first'
2920
- });
2921
- });
2922
- equal(firstInitializerRunCount, 1, 'first initializer only was run when base class created');
2923
- equal(secondInitializerRunCount, 0, 'first initializer only was run when base class created');
2924
- firstInitializerRunCount = 0;
2925
- run['default'](function() {
2926
- SecondApp.create({
2927
- router: false,
2928
- rootElement: '#qunit-fixture #second'
2929
- });
2930
- });
2931
- equal(firstInitializerRunCount, 1, 'first initializer was run when subclass created');
2932
- equal(secondInitializerRunCount, 1, 'second initializers was run when subclass created');
2933
- });
2934
-
2935
- QUnit.test("initializers are per-app", function() {
2936
- expect(0);
2937
- var FirstApp = Application['default'].extend();
2938
- FirstApp.instanceInitializer({
2939
- name: 'shouldNotCollide',
2940
- initialize: function(registry) {}
2941
- });
2942
-
2943
- var SecondApp = Application['default'].extend();
2944
- SecondApp.instanceInitializer({
2945
- name: 'shouldNotCollide',
2946
- initialize: function(registry) {}
2947
- });
2948
- });
2949
-
2950
- if (Ember.FEATURES.isEnabled("ember-application-initializer-context")) {
2951
- QUnit.test("initializers should be executed in their own context", function() {
2952
- expect(1);
2953
-
2954
- var MyApplication = Application['default'].extend();
2955
-
2956
- MyApplication.instanceInitializer({
2957
- name: 'coolBabeInitializer',
2958
- myProperty: 'coolBabe',
2959
- initialize: function(registry, application) {
2960
- equal(this.myProperty, 'coolBabe', 'should have access to its own context');
2961
- }
2962
- });
2963
-
2964
- run['default'](function() {
2965
- app = MyApplication.create({
2966
- router: false,
2967
- rootElement: '#qunit-fixture'
2968
- });
2969
- });
2970
- });
2971
- }
2972
- }
2604
+ var app, initializeContextFeatureEnabled;
2973
2605
 
2606
+
2607
+
2974
2608
  });
2975
2609
  enifed('ember-application/tests/system/instance_initializers_test.jscs-test', function () {
2976
2610
 
@@ -2992,7 +2626,7 @@ enifed('ember-application/tests/system/instance_initializers_test.jshint', funct
2992
2626
  });
2993
2627
 
2994
2628
  });
2995
- enifed('ember-application/tests/system/logging_test', ['ember-metal/run_loop', 'ember-application/system/application', 'ember-views/views/view', 'ember-runtime/controllers/controller', 'ember-routing/system/route', 'ember-runtime/ext/rsvp', 'ember-metal/keys', 'ember-routing'], function (run, Application, View, Controller, Route, RSVP, keys) {
2629
+ enifed('ember-application/tests/system/logging_test', ['ember-metal/run_loop', 'ember-application/system/application', 'ember-views/views/view', 'ember-runtime/controllers/controller', 'ember-routing/system/route', 'ember-runtime/ext/rsvp', 'ember-metal/keys', 'ember-template-compiler/system/compile', 'ember-routing'], function (run, Application, View, Controller, Route, RSVP, keys, compile) {
2996
2630
 
2997
2631
  'use strict';
2998
2632
 
@@ -3170,7 +2804,7 @@ enifed('ember-application/tests/system/logging_test', ['ember-metal/run_loop', '
3170
2804
  return;
3171
2805
  }
3172
2806
 
3173
- App.register('template:application', function() { return ''; });
2807
+ App.register('template:application', compile['default']("{{outlet}}"));
3174
2808
  run['default'](App, 'advanceReadiness');
3175
2809
 
3176
2810
  visit('/posts').then(function() {
@@ -3198,7 +2832,7 @@ enifed('ember-application/tests/system/logging_test', ['ember-metal/run_loop', '
3198
2832
  return;
3199
2833
  }
3200
2834
 
3201
- App.register('template:application', function() { return 'Template with default view'; });
2835
+ App.register('template:application', compile['default']('{{outlet}}'));
3202
2836
  App.register('template:foo', function() { return 'Template with custom view'; });
3203
2837
  App.register('view:posts', View['default'].extend({ templateName: 'foo' }));
3204
2838
  run['default'](App, 'advanceReadiness');
@@ -3712,73 +3346,7 @@ enifed('ember-application/tests/system/visit_test', ['ember-metal/run_loop', 'em
3712
3346
  return App;
3713
3347
  }
3714
3348
 
3715
- if (Ember.FEATURES.isEnabled('ember-application-visit')) {
3716
- QUnit.module("Ember.Application - visit()");
3717
-
3718
- // This tests whether the application is "autobooted" by registering an
3719
- // instance initializer and asserting it never gets run. Since this is
3720
- // inherently testing that async behavior *doesn't* happen, we set a
3721
- // 500ms timeout to verify that when autoboot is set to false, the
3722
- // instance initializer that would normally get called on DOM ready
3723
- // does not fire.
3724
- QUnit.test("Applications with autoboot set to false do not autoboot", function(assert) {
3725
- QUnit.expect(1);
3726
- QUnit.stop();
3727
-
3728
- run['default'](function() {
3729
- var app = createApplication();
3730
-
3731
- // Start the timeout
3732
- var timeout = setTimeout(function() {
3733
- ok(true, "500ms elapsed without initializers being called");
3734
- QUnit.start();
3735
- }, 500);
3736
-
3737
- // Create an instance initializer that should *not* get run.
3738
- app.instanceInitializer({
3739
- name: "assert-no-autoboot",
3740
- initialize: function() {
3741
- clearTimeout(timeout);
3742
- QUnit.start();
3743
- assert.ok(false, "instance should not have been created");
3744
- }
3745
- });
3746
- });
3747
- });
3748
-
3749
- QUnit.test("visit() returns a promise that resolves when the view has rendered", function(assert) {
3750
- QUnit.expect(3);
3751
- QUnit.stop();
3752
-
3753
- var app;
3754
-
3755
- run['default'](function() {
3756
- app = createApplication();
3757
- app.instanceInitializer({
3758
- name: 'register-application-template',
3759
- initialize: function(app) {
3760
- app.registry.register('template:application', compile['default']('<h1>Hello world</h1>'));
3761
- }
3762
- });
3763
- });
3764
-
3765
- assert.equal(Ember.$('#qunit-fixture').children().length, 0, "there are no elements in the fixture element");
3766
-
3767
- app.visit('/').then(function(instance) {
3768
- QUnit.start();
3769
- assert.ok(instance instanceof ApplicationInstance['default'], "promise is resolved with an ApplicationInstance");
3770
-
3771
- run['default'](instance.view, 'appendTo', '#qunit-fixture');
3772
- assert.equal(Ember.$("#qunit-fixture > .ember-view h1").text(), "Hello world", "the application was rendered once the promise resolves");
3773
-
3774
- instance.destroy();
3775
- }, function(error) {
3776
- QUnit.start();
3777
- assert.ok(false, "The visit() promise was rejected: " + error);
3778
- });
3779
- });
3780
- }
3781
-
3349
+
3782
3350
  });
3783
3351
  enifed('ember-application/tests/system/visit_test.jscs-test', function () {
3784
3352
 
@@ -6972,9 +6540,6 @@ enifed('ember-htmlbars/tests/compat/helper_test', ['ember-htmlbars/compat/helper
6972
6540
 
6973
6541
  var view;
6974
6542
 
6975
-
6976
- // jscs:disable validateIndentation
6977
-
6978
6543
  QUnit.module('ember-htmlbars: Handlebars compatible helpers', {
6979
6544
  teardown: function() {
6980
6545
  utils.runDestroy(view);
@@ -7231,9 +6796,6 @@ enifed('ember-htmlbars/tests/compat/helper_test', ['ember-htmlbars/compat/helper
7231
6796
  utils.runAppend(view);
7232
6797
  });
7233
6798
 
7234
- // jscs:enable validateIndentation
7235
-
7236
-
7237
6799
  });
7238
6800
  enifed('ember-htmlbars/tests/compat/helper_test.jscs-test', function () {
7239
6801
 
@@ -7913,7 +7475,6 @@ enifed('ember-htmlbars/tests/compat/precompile_test', ['ember-htmlbars/compat'],
7913
7475
  'use strict';
7914
7476
 
7915
7477
  var precompile = EmberHandlebars['default'].precompile;
7916
- var parse = EmberHandlebars['default'].parse;
7917
7478
  var template = 'Hello World';
7918
7479
  var result;
7919
7480
 
@@ -7934,18 +7495,6 @@ enifed('ember-htmlbars/tests/compat/precompile_test', ['ember-htmlbars/compat'],
7934
7495
  equal(typeof(result), "string");
7935
7496
  });
7936
7497
 
7937
- if (!Ember.FEATURES.isEnabled('ember-htmlbars')) {
7938
- // jscs:disable validateIndentation
7939
-
7940
- QUnit.test("precompile creates an object when passed an AST", function() {
7941
- var ast = parse(template);
7942
- result = precompile(ast);
7943
- equal(typeof(result), "object");
7944
- });
7945
-
7946
- // jscs:enable validateIndentation
7947
- }
7948
-
7949
7498
  });
7950
7499
  enifed('ember-htmlbars/tests/compat/precompile_test.jscs-test', function () {
7951
7500
 
@@ -8162,22 +7711,20 @@ enifed('ember-htmlbars/tests/helpers/bind_attr_test', ['ember-metal/core', 'embe
8162
7711
  var originalBindAttr = helpers['default']['bind-attr'];
8163
7712
 
8164
7713
  try {
8165
-
8166
- helpers['default']['bind-attr'] = {
8167
- helperFunction: function() {
8168
- equal(arguments[0], 'foo', 'First arg match');
8169
- equal(arguments[1], 'bar', 'Second arg match');
7714
+ helpers['default']['bind-attr'] = {
7715
+ helperFunction: function() {
7716
+ equal(arguments[0], 'foo', 'First arg match');
7717
+ equal(arguments[1], 'bar', 'Second arg match');
7718
+
7719
+ return 'result';
7720
+ }
7721
+ };
8170
7722
 
8171
- return 'result';
8172
- }
8173
- };
8174
-
8175
7723
  expectDeprecation(function() {
8176
7724
  var result;
8177
7725
 
8178
-
8179
- result = helpers['default'].bindAttr.helperFunction('foo', 'bar');
8180
- equal(result, 'result', 'Result match');
7726
+ result = helpers['default'].bindAttr.helperFunction('foo', 'bar');
7727
+ equal(result, 'result', 'Result match');
8181
7728
  }, "The 'bindAttr' view helper is deprecated in favor of 'bind-attr'");
8182
7729
  } finally {
8183
7730
  helpers['default']['bind-attr'] = originalBindAttr;
@@ -8534,6 +8081,32 @@ enifed('ember-htmlbars/tests/helpers/bind_attr_test', ['ember-metal/core', 'embe
8534
8081
  }, /You cannot set `data-bar` manually and via `{{bind-attr}}` helper on the same element/);
8535
8082
  });
8536
8083
 
8084
+ QUnit.test("src attribute bound to undefined is not present", function() {
8085
+ var template = compile['default']("<img {{bind-attr src=view.undefinedValue}}>");
8086
+
8087
+ view = EmberView['default'].create({
8088
+ template: template,
8089
+ undefinedValue: undefined
8090
+ });
8091
+
8092
+ utils.runAppend(view);
8093
+
8094
+ ok(!view.element.hasAttribute('src'), "src attribute not present");
8095
+ });
8096
+
8097
+ QUnit.test("src attribute bound to null is not present", function() {
8098
+ var template = compile['default']("<img {{bind-attr src=view.nullValue}}>");
8099
+
8100
+ view = EmberView['default'].create({
8101
+ template: template,
8102
+ nullValue: null
8103
+ });
8104
+
8105
+ utils.runAppend(view);
8106
+
8107
+ ok(!view.element.hasAttribute('src'), "src attribute not present");
8108
+ });
8109
+
8537
8110
  });
8538
8111
  enifed('ember-htmlbars/tests/helpers/bind_attr_test.jscs-test', function () {
8539
8112
 
@@ -8632,10 +8205,7 @@ enifed('ember-htmlbars/tests/helpers/collection_test', ['ember-views/views/colle
8632
8205
  template: compile['default']('{{#collection content=view.exampleController itemViewClass=TemplateTests.ExampleItemView}}beta{{/collection}}')
8633
8206
  });
8634
8207
 
8635
- var deprecation = /Resolved the view "TemplateTests.ExampleItemView" on the global context/;
8636
-
8637
- deprecation = /Global lookup of TemplateTests.ExampleItemView from a Handlebars template is deprecated/;
8638
-
8208
+ var deprecation = /Global lookup of TemplateTests.ExampleItemView from a Handlebars template is deprecated/;
8639
8209
  expectDeprecation(function() {
8640
8210
  utils.runAppend(view);
8641
8211
  }, deprecation);
@@ -10056,10 +9626,7 @@ enifed('ember-htmlbars/tests/helpers/each_test', ['ember-metal/core', 'ember-run
10056
9626
  people: people
10057
9627
  });
10058
9628
 
10059
- var deprecation = /Resolved the view "MyView" on the global context/;
10060
-
10061
- deprecation = /Global lookup of MyView from a Handlebars template is deprecated/;
10062
-
9629
+ var deprecation = /Global lookup of MyView from a Handlebars template is deprecated/;
10063
9630
 
10064
9631
  expectDeprecation(function() {
10065
9632
  utils.runAppend(view);
@@ -10175,11 +9742,7 @@ enifed('ember-htmlbars/tests/helpers/each_test', ['ember-metal/core', 'ember-run
10175
9742
  people: native_array.A()
10176
9743
  });
10177
9744
 
10178
- var deprecation = /Resolved the view "MyEmptyView" on the global context/;
10179
-
10180
-
10181
- deprecation = /Global lookup of MyEmptyView from a Handlebars template is deprecated/;
10182
-
9745
+ var deprecation = /Global lookup of MyEmptyView from a Handlebars template is deprecated/;
10183
9746
 
10184
9747
  expectDeprecation(function() {
10185
9748
  utils.runAppend(view);
@@ -10584,10 +10147,7 @@ enifed('ember-htmlbars/tests/helpers/each_test', ['ember-metal/core', 'ember-run
10584
10147
  }
10585
10148
 
10586
10149
  testEachWithItem("{{#each foo in bar}}", false);
10587
-
10588
-
10589
- testEachWithItem("{{#each bar as |foo|}}", true);
10590
-
10150
+ testEachWithItem("{{#each bar as |foo|}}", true);
10591
10151
 
10592
10152
  });
10593
10153
  enifed('ember-htmlbars/tests/helpers/each_test.jscs-test', function () {
@@ -11889,8 +11449,6 @@ enifed('ember-htmlbars/tests/helpers/loc_test', ['ember-views/views/view', 'embe
11889
11449
  utils.runDestroy(view);
11890
11450
  });
11891
11451
 
11892
-
11893
- // jscs:disable validateIndentation
11894
11452
  QUnit.test('localize throws an assertion if the second parameter is a binding', function() {
11895
11453
  var view = buildView('{{loc "Hello %@" name}}', {
11896
11454
  name: 'Bob Foster'
@@ -11914,8 +11472,6 @@ enifed('ember-htmlbars/tests/helpers/loc_test', ['ember-views/views/view', 'embe
11914
11472
 
11915
11473
  utils.runDestroy(view);
11916
11474
  });
11917
- // jscs:enable validateIndentation
11918
-
11919
11475
 
11920
11476
  });
11921
11477
  enifed('ember-htmlbars/tests/helpers/loc_test.jscs-test', function () {
@@ -14580,61 +14136,57 @@ enifed('ember-htmlbars/tests/helpers/with_test', ['ember-views/views/view', 'emb
14580
14136
  equal(view.$().text(), "We have: this is from the view and this is from the context", "should render");
14581
14137
  });
14582
14138
 
14583
-
14584
- testWithAs("ember-htmlbars: {{#with x as |y|}}", "{{#with person as |tom|}}{{title}}: {{tom.name}}{{/with}}");
14585
-
14139
+ testWithAs("ember-htmlbars: {{#with x as |y|}}", "{{#with person as |tom|}}{{title}}: {{tom.name}}{{/with}}");
14586
14140
 
14587
-
14588
- QUnit.module("Multiple Handlebars {{with foo as |bar|}} helpers", {
14589
- setup: function() {
14590
- Ember.lookup = lookup = { Ember: Ember };
14141
+ QUnit.module("Multiple Handlebars {{with foo as |bar|}} helpers", {
14142
+ setup: function() {
14143
+ Ember.lookup = lookup = { Ember: Ember };
14591
14144
 
14592
- view = EmberView['default'].create({
14593
- template: compile['default']("Admin: {{#with admin as |person|}}{{person.name}}{{/with}} User: {{#with user as |person|}}{{person.name}}{{/with}}"),
14594
- context: {
14595
- admin: { name: "Tom Dale" },
14596
- user: { name: "Yehuda Katz" }
14597
- }
14598
- });
14145
+ view = EmberView['default'].create({
14146
+ template: compile['default']("Admin: {{#with admin as |person|}}{{person.name}}{{/with}} User: {{#with user as |person|}}{{person.name}}{{/with}}"),
14147
+ context: {
14148
+ admin: { name: "Tom Dale" },
14149
+ user: { name: "Yehuda Katz" }
14150
+ }
14151
+ });
14599
14152
 
14600
- utils.runAppend(view);
14601
- },
14153
+ utils.runAppend(view);
14154
+ },
14602
14155
 
14603
- teardown: function() {
14604
- utils.runDestroy(view);
14605
- Ember.lookup = originalLookup;
14606
- }
14607
- });
14156
+ teardown: function() {
14157
+ utils.runDestroy(view);
14158
+ Ember.lookup = originalLookup;
14159
+ }
14160
+ });
14608
14161
 
14609
- QUnit.test("re-using the same variable with different #with blocks does not override each other", function() {
14610
- equal(view.$().text(), "Admin: Tom Dale User: Yehuda Katz", "should be properly scoped");
14611
- });
14162
+ QUnit.test("re-using the same variable with different #with blocks does not override each other", function() {
14163
+ equal(view.$().text(), "Admin: Tom Dale User: Yehuda Katz", "should be properly scoped");
14164
+ });
14612
14165
 
14613
- QUnit.test("the scoped variable is not available outside the {{with}} block.", function() {
14614
- run['default'](function() {
14615
- view.set('template', compile['default']("{{name}}-{{#with other as |name|}}{{name}}{{/with}}-{{name}}"));
14616
- view.set('context', {
14617
- name: 'Stef',
14618
- other: 'Yehuda'
14619
- });
14166
+ QUnit.test("the scoped variable is not available outside the {{with}} block.", function() {
14167
+ run['default'](function() {
14168
+ view.set('template', compile['default']("{{name}}-{{#with other as |name|}}{{name}}{{/with}}-{{name}}"));
14169
+ view.set('context', {
14170
+ name: 'Stef',
14171
+ other: 'Yehuda'
14620
14172
  });
14621
-
14622
- equal(view.$().text(), "Stef-Yehuda-Stef", "should be properly scoped after updating");
14623
14173
  });
14624
14174
 
14625
- QUnit.test("nested {{with}} blocks shadow the outer scoped variable properly.", function() {
14626
- run['default'](function() {
14627
- view.set('template', compile['default']("{{#with first as |ring|}}{{ring}}-{{#with fifth as |ring|}}{{ring}}-{{#with ninth as |ring|}}{{ring}}-{{/with}}{{ring}}-{{/with}}{{ring}}{{/with}}"));
14628
- view.set('context', {
14629
- first: 'Limbo',
14630
- fifth: 'Wrath',
14631
- ninth: 'Treachery'
14632
- });
14633
- });
14175
+ equal(view.$().text(), "Stef-Yehuda-Stef", "should be properly scoped after updating");
14176
+ });
14634
14177
 
14635
- equal(view.$().text(), "Limbo-Wrath-Treachery-Wrath-Limbo", "should be properly scoped after updating");
14178
+ QUnit.test("nested {{with}} blocks shadow the outer scoped variable properly.", function() {
14179
+ run['default'](function() {
14180
+ view.set('template', compile['default']("{{#with first as |ring|}}{{ring}}-{{#with fifth as |ring|}}{{ring}}-{{#with ninth as |ring|}}{{ring}}-{{/with}}{{ring}}-{{/with}}{{ring}}{{/with}}"));
14181
+ view.set('context', {
14182
+ first: 'Limbo',
14183
+ fifth: 'Wrath',
14184
+ ninth: 'Treachery'
14185
+ });
14636
14186
  });
14637
-
14187
+
14188
+ equal(view.$().text(), "Limbo-Wrath-Treachery-Wrath-Limbo", "should be properly scoped after updating");
14189
+ });
14638
14190
 
14639
14191
  });
14640
14192
  enifed('ember-htmlbars/tests/helpers/with_test.jscs-test', function () {
@@ -14860,31 +14412,6 @@ enifed('ember-htmlbars/tests/helpers/yield_test', ['ember-metal/run_loop', 'embe
14860
14412
  equal(view.$('div p:contains(update) + p:contains(update)').length, 1, "keyword has correctly propagated update");
14861
14413
  });
14862
14414
 
14863
- if (!Ember.FEATURES.isEnabled('ember-htmlbars')) {
14864
- // jscs:disable validateIndentation
14865
-
14866
- QUnit.test("yield uses the layout context for non component [DEPRECATED]", function() {
14867
- view = EmberView['default'].create({
14868
- controller: {
14869
- boundText: "outer",
14870
- inner: {
14871
- boundText: "inner"
14872
- }
14873
- },
14874
- layout: compile['default']("<p>{{boundText}}</p>{{#with inner}}<p>{{yield}}</p>{{/with}}"),
14875
- template: compile['default']('{{boundText}}')
14876
- });
14877
-
14878
- expectDeprecation(function() {
14879
- utils.runAppend(view);
14880
- }, 'Using the context switching form of `{{with}}` is deprecated. Please use the keyword form (`{{with foo as bar}}`) instead.');
14881
-
14882
- equal('outerinner', view.$('p').text(), "Yield points at the right context");
14883
- });
14884
-
14885
- // jscs:enable validateIndentation
14886
- }
14887
-
14888
14415
  QUnit.test("yield view should be a virtual view", function() {
14889
14416
  var component = Component['default'].extend({
14890
14417
  isParentComponent: true,
@@ -15055,57 +14582,7 @@ enifed('ember-htmlbars/tests/hooks/component_test', ['ember-views/component_look
15055
14582
 
15056
14583
  var view, registry, container;
15057
14584
 
15058
- // this is working around a bug in defeatureify that prevents nested flags
15059
- // from being stripped
15060
- var componentGenerationEnabled = false;
15061
- if (Ember.FEATURES.isEnabled('ember-htmlbars-component-generation')) {
15062
- componentGenerationEnabled = true;
15063
- }
15064
-
15065
14585
 
15066
- if (componentGenerationEnabled) {
15067
- QUnit.module("ember-htmlbars: component hook", {
15068
- setup: function() {
15069
- registry = new Registry['default']();
15070
- container = registry.container();
15071
-
15072
- registry.optionsForType('template', { instantiate: false });
15073
- registry.register('component-lookup:main', ComponentLookup['default']);
15074
- },
15075
-
15076
- teardown: function() {
15077
- utils.runDestroy(view);
15078
- utils.runDestroy(container);
15079
- registry = container = view = null;
15080
- }
15081
- });
15082
-
15083
- QUnit.test("component is looked up from the container", function() {
15084
- registry.register('template:components/foo-bar', compile['default']('yippie!'));
15085
-
15086
- view = EmberView['default'].create({
15087
- container: container,
15088
- template: compile['default']("<foo-bar />")
15089
- });
15090
-
15091
- utils.runAppend(view);
15092
-
15093
- equal(view.$().text(), 'yippie!', 'component was looked up and rendered');
15094
- });
15095
-
15096
- QUnit.test("asserts if component is not found", function() {
15097
- view = EmberView['default'].create({
15098
- container: container,
15099
- template: compile['default']("<foo-bar />")
15100
- });
15101
-
15102
- expectAssertion(function() {
15103
- utils.runAppend(view);
15104
- }, 'You specified `foo-bar` in your template, but a component for `foo-bar` could not be found.');
15105
- });
15106
- }
15107
-
15108
-
15109
14586
  });
15110
14587
  enifed('ember-htmlbars/tests/hooks/component_test.jscs-test', function () {
15111
14588
 
@@ -15227,48 +14704,46 @@ enifed('ember-htmlbars/tests/hooks/text_node_test', ['ember-views/views/view', '
15227
14704
 
15228
14705
  var view;
15229
14706
 
15230
-
15231
- QUnit.module("ember-htmlbars: hooks/text_node_test", {
15232
- teardown: function() {
15233
- utils.runDestroy(view);
15234
- }
14707
+ QUnit.module("ember-htmlbars: hooks/text_node_test", {
14708
+ teardown: function() {
14709
+ utils.runDestroy(view);
14710
+ }
14711
+ });
14712
+
14713
+ QUnit.test("property is output", function() {
14714
+ view = EmberView['default'].create({
14715
+ context: { name: 'erik' },
14716
+ template: compile['default']("ohai {{name}}")
15235
14717
  });
14718
+ utils.runAppend(view);
15236
14719
 
15237
- QUnit.test("property is output", function() {
15238
- view = EmberView['default'].create({
15239
- context: { name: 'erik' },
15240
- template: compile['default']("ohai {{name}}")
15241
- });
15242
- utils.runAppend(view);
14720
+ htmlbars_test_helpers.equalInnerHTML(view.element, 'ohai erik', "property is output");
14721
+ });
15243
14722
 
15244
- htmlbars_test_helpers.equalInnerHTML(view.element, 'ohai erik', "property is output");
14723
+ QUnit.test("path is output", function() {
14724
+ view = EmberView['default'].create({
14725
+ context: { name: { firstName: 'erik' } },
14726
+ template: compile['default']("ohai {{name.firstName}}")
15245
14727
  });
14728
+ utils.runAppend(view);
15246
14729
 
15247
- QUnit.test("path is output", function() {
15248
- view = EmberView['default'].create({
15249
- context: { name: { firstName: 'erik' } },
15250
- template: compile['default']("ohai {{name.firstName}}")
15251
- });
15252
- utils.runAppend(view);
14730
+ htmlbars_test_helpers.equalInnerHTML(view.element, 'ohai erik', "path is output");
14731
+ });
15253
14732
 
15254
- htmlbars_test_helpers.equalInnerHTML(view.element, 'ohai erik', "path is output");
14733
+ QUnit.test("changed property updates", function() {
14734
+ var context = EmberObject['default'].create({ name: 'erik' });
14735
+ view = EmberView['default'].create({
14736
+ context: context,
14737
+ template: compile['default']("ohai {{name}}")
15255
14738
  });
14739
+ utils.runAppend(view);
15256
14740
 
15257
- QUnit.test("changed property updates", function() {
15258
- var context = EmberObject['default'].create({ name: 'erik' });
15259
- view = EmberView['default'].create({
15260
- context: context,
15261
- template: compile['default']("ohai {{name}}")
15262
- });
15263
- utils.runAppend(view);
15264
-
15265
- htmlbars_test_helpers.equalInnerHTML(view.element, 'ohai erik', "precond - original property is output");
14741
+ htmlbars_test_helpers.equalInnerHTML(view.element, 'ohai erik', "precond - original property is output");
15266
14742
 
15267
- run['default'](context, context.set, 'name', 'mmun');
14743
+ run['default'](context, context.set, 'name', 'mmun');
15268
14744
 
15269
- htmlbars_test_helpers.equalInnerHTML(view.element, 'ohai mmun', "new property is output");
15270
- });
15271
-
14745
+ htmlbars_test_helpers.equalInnerHTML(view.element, 'ohai mmun', "new property is output");
14746
+ });
15272
14747
 
15273
14748
  });
15274
14749
  enifed('ember-htmlbars/tests/hooks/text_node_test.jscs-test', function () {
@@ -15295,19 +14770,16 @@ enifed('ember-htmlbars/tests/htmlbars_test', ['ember-template-compiler/system/co
15295
14770
 
15296
14771
  'use strict';
15297
14772
 
15298
-
15299
-
15300
- QUnit.module("ember-htmlbars: main");
14773
+ QUnit.module("ember-htmlbars: main");
15301
14774
 
15302
- QUnit.test("HTMLBars is present and can be executed", function() {
15303
- var template = compile['default']("ohai");
14775
+ QUnit.test("HTMLBars is present and can be executed", function() {
14776
+ var template = compile['default']("ohai");
15304
14777
 
15305
- var env = merge['default']({ dom: defaultEnv.domHelper }, defaultEnv['default']);
14778
+ var env = merge['default']({ dom: defaultEnv.domHelper }, defaultEnv['default']);
15306
14779
 
15307
- var output = template.render({}, env, document.body);
15308
- htmlbars_test_helpers.equalHTML(output, "ohai");
15309
- });
15310
-
14780
+ var output = template.render({}, env, document.body);
14781
+ htmlbars_test_helpers.equalHTML(output, "ohai");
14782
+ });
15311
14783
 
15312
14784
  });
15313
14785
  enifed('ember-htmlbars/tests/htmlbars_test.jscs-test', function () {
@@ -15537,9 +15009,6 @@ enifed('ember-htmlbars/tests/integration/block_params_test', ['container/registr
15537
15009
  });
15538
15010
  }
15539
15011
 
15540
-
15541
- // jscs:disable validateIndentation
15542
-
15543
15012
  QUnit.module("ember-htmlbars: block params", {
15544
15013
  setup: function() {
15545
15014
  helpers.registerHelper('alias', aliasHelper);
@@ -15656,9 +15125,6 @@ enifed('ember-htmlbars/tests/integration/block_params_test', ['container/registr
15656
15125
  equal(view.$().text(), "ebryn[trek[machty]trek]ebryn[machty[trek]machty]ebryn");
15657
15126
  });
15658
15127
 
15659
- // jscs:enable validateIndentation
15660
-
15661
-
15662
15128
  });
15663
15129
  enifed('ember-htmlbars/tests/integration/block_params_test.jscs-test', function () {
15664
15130
 
@@ -16941,9 +16407,6 @@ enifed('ember-htmlbars/tests/system/make_bound_helper_test', ['ember-views/views
16941
16407
  }));
16942
16408
  }
16943
16409
 
16944
-
16945
- // jscs:disable validateIndentation
16946
-
16947
16410
  QUnit.module("ember-htmlbars: makeBoundHelper", {
16948
16411
  setup: function() {
16949
16412
  registry = new Registry['default']();
@@ -17199,9 +16662,6 @@ enifed('ember-htmlbars/tests/system/make_bound_helper_test', ['ember-views/views
17199
16662
  equal(view.$().text(), 'aaa');
17200
16663
  });
17201
16664
 
17202
- // jscs:enable validateIndentation
17203
-
17204
-
17205
16665
  });
17206
16666
  enifed('ember-htmlbars/tests/system/make_bound_helper_test.jscs-test', function () {
17207
16667
 
@@ -17278,6 +16738,7 @@ enifed('ember-htmlbars/tests/system/render_view_test', ['ember-runtime/tests/uti
17278
16738
  view = EmberView['default'].create({
17279
16739
  template: {
17280
16740
  isHTMLBars: true,
16741
+ revision: 'Ember@1.11.0-beta.2',
17281
16742
  render: function(view, env, contextualElement, blockArguments) {
17282
16743
  for (var i = 0, l = keyNames.length; i < l; i++) {
17283
16744
  var keyName = keyNames[i];
@@ -17291,6 +16752,21 @@ enifed('ember-htmlbars/tests/system/render_view_test', ['ember-runtime/tests/uti
17291
16752
  utils.runAppend(view);
17292
16753
  });
17293
16754
 
16755
+ QUnit.test('Provides a helpful assertion if revisions do not match.', function() {
16756
+ view = EmberView['default'].create({
16757
+ template: {
16758
+ isHTMLBars: true,
16759
+ revision: 'Foo-Bar-Baz',
16760
+ render: function() { }
16761
+ }
16762
+ });
16763
+
16764
+ expectAssertion(function() {
16765
+ utils.runAppend(view);
16766
+ },
16767
+ /was compiled with `Foo-Bar-Baz`/);
16768
+ });
16769
+
17294
16770
  });
17295
16771
  enifed('ember-htmlbars/tests/system/render_view_test.jscs-test', function () {
17296
16772
 
@@ -17731,15 +17207,13 @@ enifed('ember-metal-views/tests/test_helpers', ['exports', 'ember-metal/platform
17731
17207
  }
17732
17208
  }
17733
17209
  if (view.childViews) {
17734
- view._childViewsMorph = this._dom.createMorph(el, null, null);
17210
+ view._childViewsMorph = this._dom.appendMorph(el);
17735
17211
  } else if (view.textContent) {
17736
17212
  setElementText(el, view.textContent);
17737
17213
  } else if (view.innerHTML) {
17738
17214
  this._dom.detectNamespace(el);
17739
- var nodes = this._dom.parseHTML(view.innerHTML, el);
17740
- while (nodes[0]) {
17741
- el.appendChild(nodes[0]);
17742
- }
17215
+ var frag = this._dom.parseHTML(view.innerHTML, el);
17216
+ el.appendChild(frag);
17743
17217
  }
17744
17218
  return el;
17745
17219
  };
@@ -20851,71 +20325,7 @@ enifed('ember-metal/tests/computed_test', ['ember-metal/core', 'ember-metal/test
20851
20325
  // improved-cp-syntax
20852
20326
  //
20853
20327
 
20854
- if (Ember['default'].FEATURES.isEnabled("new-computed-syntax")) {
20855
- QUnit.module('computed - improved cp syntax');
20856
-
20857
- QUnit.test('setter and getters are passed using an object', function() {
20858
- var testObj = Ember['default'].Object.extend({
20859
- a: '1',
20860
- b: '2',
20861
- aInt: computed.computed('a', {
20862
- get: function(keyName) {
20863
- equal(keyName, 'aInt', 'getter receives the keyName');
20864
- return parseInt(this.get('a'));
20865
- },
20866
- set: function(keyName, value, oldValue) {
20867
- equal(keyName, 'aInt', 'setter receives the keyName');
20868
- equal(value, 123, 'setter receives the new value');
20869
- equal(oldValue, 1, 'setter receives the old value');
20870
- this.set('a', ""+value); // side effect
20871
- return parseInt(this.get('a'));
20872
- }
20873
- })
20874
- }).create();
20875
-
20876
- ok(testObj.get('aInt') === 1, 'getter works');
20877
- testObj.set('aInt', 123);
20878
- ok(testObj.get('a') === '123', 'setter works');
20879
- ok(testObj.get('aInt') === 123, 'cp has been updated too');
20880
- });
20881
-
20882
- QUnit.test('setter can be omited', function() {
20883
- var testObj = Ember['default'].Object.extend({
20884
- a: '1',
20885
- b: '2',
20886
- aInt: computed.computed('a', {
20887
- get: function(keyName) {
20888
- equal(keyName, 'aInt', 'getter receives the keyName');
20889
- return parseInt(this.get('a'));
20890
- }
20891
- })
20892
- }).create();
20893
-
20894
- ok(testObj.get('aInt') === 1, 'getter works');
20895
- ok(testObj.get('a') === '1');
20896
- testObj.set('aInt', '123');
20897
- ok(testObj.get('aInt') === '123', 'cp has been updated too');
20898
- });
20899
-
20900
- QUnit.test('the return value of the setter gets cached', function() {
20901
- var testObj = Ember['default'].Object.extend({
20902
- a: '1',
20903
- sampleCP: computed.computed('a', {
20904
- get: function(keyName) {
20905
- ok(false, "The getter should not be invoked");
20906
- return 'get-value';
20907
- },
20908
- set: function(keyName, value, oldValue) {
20909
- return 'set-value';
20910
- }
20911
- })
20912
- }).create();
20913
-
20914
- testObj.set('sampleCP', 'abcd');
20915
- ok(testObj.get('sampleCP') === 'set-value', 'The return value of the CP was cached');
20916
- });
20917
- }
20918
-
20328
+
20919
20329
  // ..........................................................
20920
20330
  // BUGS
20921
20331
  //
@@ -29411,8 +28821,6 @@ enifed('ember-routing-htmlbars/tests/helpers/action_test', ['ember-metal/core',
29411
28821
  equal(watted, true, "The action was called on the right context");
29412
28822
  });
29413
28823
 
29414
- if (!Ember['default'].FEATURES.isEnabled('ember-htmlbars')) {
29415
- // jscs:disable validateIndentation
29416
28824
  QUnit.test("should target the current controller inside an {{each}} loop [DEPRECATED]", function() {
29417
28825
  var registeredTarget;
29418
28826
 
@@ -29435,7 +28843,7 @@ enifed('ember-routing-htmlbars/tests/helpers/action_test', ['ember-metal/core',
29435
28843
 
29436
28844
  view = EmberView['default'].create({
29437
28845
  controller: controller,
29438
- template: compile['default']('{{#each controller}}{{action "editTodo"}}{{/each}}')
28846
+ template: compile['default']('{{#each controller}}<button {{action "editTodo"}}>Edit</button>{{/each}}')
29439
28847
  });
29440
28848
 
29441
28849
  expectDeprecation(function() {
@@ -29444,8 +28852,6 @@ enifed('ember-routing-htmlbars/tests/helpers/action_test', ['ember-metal/core',
29444
28852
 
29445
28853
  equal(registeredTarget, itemController, "the item controller is the target of action");
29446
28854
  });
29447
- // jscs:enable validateIndentation
29448
- }
29449
28855
 
29450
28856
  QUnit.test("should target the with-controller inside an {{#with controller='person'}} [DEPRECATED]", function() {
29451
28857
  var registeredTarget;
@@ -30486,13 +29892,13 @@ enifed('ember-routing-htmlbars/tests/helpers/link-to_test.jshint', function () {
30486
29892
  });
30487
29893
 
30488
29894
  });
30489
- enifed('ember-routing-htmlbars/tests/helpers/outlet_test', ['ember-metal/core', 'ember-metal/run_loop', 'ember-runtime/system/namespace', 'ember-views/views/metamorph_view', 'ember-routing/ext/view', 'ember-views/views/container_view', 'ember-views/system/jquery', 'ember-routing-htmlbars/helpers/outlet', 'ember-template-compiler/system/compile', 'ember-htmlbars/helpers', 'ember-runtime/tests/utils', 'ember-routing-htmlbars/tests/utils'], function (Ember, run, Namespace, _MetamorphView, EmberView, EmberContainerView, jQuery, outlet, compile, helpers, utils, tests__utils) {
29895
+ enifed('ember-routing-htmlbars/tests/helpers/outlet_test', ['ember-metal/run_loop', 'ember-runtime/system/namespace', 'ember-views/views/view', 'ember-views/system/jquery', 'ember-routing-htmlbars/helpers/outlet', 'ember-template-compiler/system/compile', 'ember-htmlbars/helpers', 'ember-runtime/tests/utils', 'ember-routing-htmlbars/tests/utils'], function (run, Namespace, EmberView, jQuery, outlet, compile, helpers, utils, tests__utils) {
30490
29896
 
30491
29897
  'use strict';
30492
29898
 
30493
29899
  var trim = jQuery['default'].trim;
30494
29900
 
30495
- var view, registry, container, originalOutletHelper;
29901
+ var registry, container, originalOutletHelper, top;
30496
29902
 
30497
29903
  QUnit.module("ember-routing-htmlbars: {{outlet}} helper", {
30498
29904
  setup: function() {
@@ -30502,6 +29908,9 @@ enifed('ember-routing-htmlbars/tests/helpers/outlet_test', ['ember-metal/core',
30502
29908
  var namespace = Namespace['default'].create();
30503
29909
  registry = tests__utils.buildRegistry(namespace);
30504
29910
  container = registry.container();
29911
+
29912
+ var CoreOutlet = container.lookupFactory('view:core-outlet');
29913
+ top = CoreOutlet.create();
30505
29914
  },
30506
29915
 
30507
29916
  teardown: function() {
@@ -30509,301 +29918,231 @@ enifed('ember-routing-htmlbars/tests/helpers/outlet_test', ['ember-metal/core',
30509
29918
  helpers['default']['outlet'] = originalOutletHelper;
30510
29919
 
30511
29920
  utils.runDestroy(container);
30512
- utils.runDestroy(view);
30513
- registry = container = view = null;
29921
+ utils.runDestroy(top);
29922
+ registry = container = top = null;
30514
29923
  }
30515
29924
  });
30516
29925
 
30517
- QUnit.test("view should support connectOutlet for the main outlet", function() {
30518
- var template = "<h1>HI</h1>{{outlet}}";
30519
- view = EmberView['default'].create({
30520
- template: compile['default'](template)
30521
- });
29926
+ QUnit.test("view should render the outlet when set after dom insertion", function() {
29927
+ var routerState = withTemplate("<h1>HI</h1>{{outlet}}");
29928
+ top.setOutletState(routerState);
29929
+ utils.runAppend(top);
30522
29930
 
30523
- utils.runAppend(view);
29931
+ equal(top.$().text(), 'HI');
30524
29932
 
30525
- equal(view.$().text(), 'HI');
29933
+ routerState.outlets.main = withTemplate("<p>BYE</p>");
30526
29934
 
30527
29935
  run['default'](function() {
30528
- view.connectOutlet('main', EmberView['default'].create({
30529
- template: compile['default']("<p>BYE</p>")
30530
- }));
29936
+ top.setOutletState(routerState);
30531
29937
  });
30532
29938
 
30533
29939
  // Replace whitespace for older IE
30534
- equal(trim(view.$().text()), 'HIBYE');
29940
+ equal(trim(top.$().text()), 'HIBYE');
30535
29941
  });
30536
29942
 
30537
- QUnit.test("outlet should support connectOutlet in slots in prerender state", function() {
30538
- var template = "<h1>HI</h1>{{outlet}}";
30539
- view = EmberView['default'].create({
30540
- template: compile['default'](template)
30541
- });
29943
+ QUnit.test("view should render the outlet when set before dom insertion", function() {
29944
+ var routerState = withTemplate("<h1>HI</h1>{{outlet}}");
29945
+ routerState.outlets.main = withTemplate("<p>BYE</p>");
29946
+ top.setOutletState(routerState);
29947
+ utils.runAppend(top);
30542
29948
 
30543
- view.connectOutlet('main', EmberView['default'].create({
30544
- template: compile['default']("<p>BYE</p>")
30545
- }));
30546
-
30547
- utils.runAppend(view);
30548
-
30549
- equal(view.$().text(), 'HIBYE');
29949
+ // Replace whitespace for older IE
29950
+ equal(trim(top.$().text()), 'HIBYE');
30550
29951
  });
30551
29952
 
29953
+
30552
29954
  QUnit.test("outlet should support an optional name", function() {
30553
- var template = "<h1>HI</h1>{{outlet 'mainView'}}";
30554
- view = EmberView['default'].create({
30555
- template: compile['default'](template)
30556
- });
29955
+ var routerState = withTemplate("<h1>HI</h1>{{outlet 'mainView'}}");
29956
+ top.setOutletState(routerState);
29957
+ utils.runAppend(top);
30557
29958
 
30558
- utils.runAppend(view);
29959
+ equal(top.$().text(), 'HI');
30559
29960
 
30560
- equal(view.$().text(), 'HI');
29961
+ routerState.outlets.mainView = withTemplate("<p>BYE</p>");
30561
29962
 
30562
29963
  run['default'](function() {
30563
- view.connectOutlet('mainView', EmberView['default'].create({
30564
- template: compile['default']("<p>BYE</p>")
30565
- }));
29964
+ top.setOutletState(routerState);
30566
29965
  });
30567
29966
 
30568
29967
  // Replace whitespace for older IE
30569
- equal(trim(view.$().text()), 'HIBYE');
29968
+ equal(trim(top.$().text()), 'HIBYE');
30570
29969
  });
30571
29970
 
30572
29971
 
30573
29972
  QUnit.test("outlet should correctly lookup a view", function() {
30574
-
30575
- var template,
30576
- ContainerView,
30577
- childView;
30578
-
30579
- ContainerView = EmberContainerView['default'].extend();
30580
-
30581
- registry.register("view:containerView", ContainerView);
30582
-
30583
- template = "<h1>HI</h1>{{outlet view='containerView'}}";
30584
-
30585
- view = EmberView['default'].create({
30586
- template: compile['default'](template),
30587
- container : container
29973
+ var CoreOutlet = container.lookupFactory('view:core-outlet');
29974
+ var SpecialOutlet = CoreOutlet.extend({
29975
+ classNames: ['special']
30588
29976
  });
30589
29977
 
30590
- childView = EmberView['default'].create({
30591
- template: compile['default']("<p>BYE</p>")
30592
- });
29978
+ registry.register("view:special-outlet", SpecialOutlet);
30593
29979
 
30594
- utils.runAppend(view);
29980
+ var routerState = withTemplate("<h1>HI</h1>{{outlet view='special-outlet'}}");
29981
+ top.setOutletState(routerState);
29982
+ utils.runAppend(top);
30595
29983
 
30596
- equal(view.$().text(), 'HI');
29984
+ equal(top.$().text(), 'HI');
30597
29985
 
29986
+ routerState.outlets.main = withTemplate("<p>BYE</p>");
30598
29987
  run['default'](function() {
30599
- view.connectOutlet('main', childView);
29988
+ top.setOutletState(routerState);
30600
29989
  });
30601
29990
 
30602
- ok(ContainerView.detectInstance(childView._parentView), "The custom view class should be used for the outlet");
30603
-
30604
29991
  // Replace whitespace for older IE
30605
- equal(trim(view.$().text()), 'HIBYE');
30606
-
29992
+ equal(trim(top.$().text()), 'HIBYE');
29993
+ equal(top.$().find('.special').length, 1, "expected to find .special element");
30607
29994
  });
30608
29995
 
30609
29996
  QUnit.test("outlet should assert view is specified as a string", function() {
30610
-
30611
- var template = "<h1>HI</h1>{{outlet view=containerView}}";
29997
+ top.setOutletState(withTemplate("<h1>HI</h1>{{outlet view=containerView}}"));
30612
29998
 
30613
29999
  expectAssertion(function () {
30614
-
30615
- view = EmberView['default'].create({
30616
- template: compile['default'](template),
30617
- container : container
30618
- });
30619
-
30620
- utils.runAppend(view);
30621
-
30622
- });
30000
+ utils.runAppend(top);
30001
+ }, /Using a quoteless view parameter with {{outlet}} is not supported/);
30623
30002
 
30624
30003
  });
30625
30004
 
30626
30005
  QUnit.test("outlet should assert view path is successfully resolved", function() {
30627
-
30628
- var template = "<h1>HI</h1>{{outlet view='someViewNameHere'}}";
30006
+ top.setOutletState(withTemplate("<h1>HI</h1>{{outlet view='someViewNameHere'}}"));
30629
30007
 
30630
30008
  expectAssertion(function () {
30631
-
30632
- view = EmberView['default'].create({
30633
- template: compile['default'](template),
30634
- container : container
30635
- });
30636
-
30637
- utils.runAppend(view);
30638
-
30639
- });
30009
+ utils.runAppend(top);
30010
+ }, "The view name you supplied 'someViewNameHere' did not resolve to a view.");
30640
30011
 
30641
30012
  });
30642
30013
 
30643
30014
  QUnit.test("outlet should support an optional view class", function() {
30644
- var template = "<h1>HI</h1>{{outlet viewClass=view.outletView}}";
30645
- view = EmberView['default'].create({
30646
- template: compile['default'](template),
30647
- outletView: EmberContainerView['default'].extend()
30648
- });
30015
+ var CoreOutlet = container.lookupFactory('view:core-outlet');
30016
+ var SpecialOutlet = CoreOutlet.extend({
30017
+ classNames: ['very-special']
30018
+ });
30019
+ var routerState = {
30020
+ render: {
30021
+ ViewClass: EmberView['default'].extend({
30022
+ template: compile['default']("<h1>HI</h1>{{outlet viewClass=view.outletView}}"),
30023
+ outletView: SpecialOutlet
30024
+ })
30025
+ },
30026
+ outlets: {}
30027
+ };
30028
+ top.setOutletState(routerState);
30649
30029
 
30650
- utils.runAppend(view);
30030
+ utils.runAppend(top);
30651
30031
 
30652
- equal(view.$().text(), 'HI');
30032
+ equal(top.$().text(), 'HI');
30033
+ equal(top.$().find('.very-special').length, 1, "Should find .very-special");
30653
30034
 
30654
- var childView = EmberView['default'].create({
30655
- template: compile['default']("<p>BYE</p>")
30656
- });
30035
+ routerState.outlets.main = withTemplate("<p>BYE</p>");
30657
30036
 
30658
30037
  run['default'](function() {
30659
- view.connectOutlet('main', childView);
30038
+ top.setOutletState(routerState);
30660
30039
  });
30661
30040
 
30662
- ok(view.outletView.detectInstance(childView._parentView), "The custom view class should be used for the outlet");
30663
-
30664
30041
  // Replace whitespace for older IE
30665
- equal(trim(view.$().text()), 'HIBYE');
30042
+ equal(trim(top.$().text()), 'HIBYE');
30666
30043
  });
30667
30044
 
30668
30045
 
30669
30046
  QUnit.test("Outlets bind to the current view, not the current concrete view", function() {
30670
- var parentTemplate = "<h1>HI</h1>{{outlet}}";
30671
- var middleTemplate = "<h2>MIDDLE</h2>{{outlet}}";
30672
- var bottomTemplate = "<h3>BOTTOM</h3>";
30673
-
30674
- view = EmberView['default'].create({
30675
- template: compile['default'](parentTemplate)
30676
- });
30677
-
30678
- var middleView = _MetamorphView['default'].create({
30679
- template: compile['default'](middleTemplate)
30680
- });
30681
-
30682
- var bottomView = _MetamorphView['default'].create({
30683
- template: compile['default'](bottomTemplate)
30684
- });
30685
-
30686
- utils.runAppend(view);
30687
-
30047
+ var routerState = withTemplate("<h1>HI</h1>{{outlet}}");
30048
+ top.setOutletState(routerState);
30049
+ utils.runAppend(top);
30050
+ routerState.outlets.main = withTemplate("<h2>MIDDLE</h2>{{outlet}}");
30688
30051
  run['default'](function() {
30689
- view.connectOutlet('main', middleView);
30052
+ top.setOutletState(routerState);
30690
30053
  });
30691
-
30054
+ routerState.outlets.main.outlets.main = withTemplate("<h3>BOTTOM</h3>");
30692
30055
  run['default'](function() {
30693
- middleView.connectOutlet('main', bottomView);
30056
+ top.setOutletState(routerState);
30694
30057
  });
30695
30058
 
30696
30059
  var output = jQuery['default']('#qunit-fixture h1 ~ h2 ~ h3').text();
30697
30060
  equal(output, "BOTTOM", "all templates were rendered");
30698
30061
  });
30699
30062
 
30700
- QUnit.test("view should support disconnectOutlet for the main outlet", function() {
30701
- var template = "<h1>HI</h1>{{outlet}}";
30702
- view = EmberView['default'].create({
30703
- template: compile['default'](template)
30704
- });
30705
-
30706
- utils.runAppend(view);
30707
-
30708
- equal(view.$().text(), 'HI');
30709
-
30710
- run['default'](function() {
30711
- view.connectOutlet('main', EmberView['default'].create({
30712
- template: compile['default']("<p>BYE</p>")
30713
- }));
30714
- });
30715
-
30716
- // Replace whitespace for older IE
30717
- equal(trim(view.$().text()), 'HIBYE');
30718
-
30719
- run['default'](function() {
30720
- view.disconnectOutlet('main');
30721
- });
30722
-
30723
- // Replace whitespace for older IE
30724
- equal(trim(view.$().text()), 'HI');
30725
- });
30726
-
30727
- // TODO: Remove flag when {{with}} is fixed.
30728
- if (!Ember['default'].FEATURES.isEnabled('ember-htmlbars')) {
30729
- // jscs:disable validateIndentation
30730
-
30731
30063
  QUnit.test("Outlets bind to the current template's view, not inner contexts [DEPRECATED]", function() {
30732
- var parentTemplate = "<h1>HI</h1>{{#if view.alwaysTrue}}{{#with this}}{{outlet}}{{/with}}{{/if}}";
30064
+ var parentTemplate = "<h1>HI</h1>{{#if view.alwaysTrue}}{{outlet}}{{/if}}";
30733
30065
  var bottomTemplate = "<h3>BOTTOM</h3>";
30734
30066
 
30735
- view = EmberView['default'].create({
30736
- alwaysTrue: true,
30737
- template: compile['default'](parentTemplate)
30738
- });
30067
+ var routerState = {
30068
+ render: {
30069
+ ViewClass: EmberView['default'].extend({
30070
+ alwaysTrue: true,
30071
+ template: compile['default'](parentTemplate)
30072
+ })
30073
+ },
30074
+ outlets: {}
30075
+ };
30739
30076
 
30740
- var bottomView = _MetamorphView['default'].create({
30741
- template: compile['default'](bottomTemplate)
30742
- });
30077
+ top.setOutletState(routerState);
30743
30078
 
30744
- expectDeprecation(function() {
30745
- utils.runAppend(view);
30746
- }, 'Using the context switching form of `{{with}}` is deprecated. Please use the keyword form (`{{with foo as bar}}`) instead.');
30079
+ utils.runAppend(top);
30080
+
30081
+ routerState.outlets.main = withTemplate(bottomTemplate);
30747
30082
 
30748
30083
  run['default'](function() {
30749
- view.connectOutlet('main', bottomView);
30084
+ top.setOutletState(routerState);
30750
30085
  });
30751
30086
 
30752
30087
  var output = jQuery['default']('#qunit-fixture h1 ~ h3').text();
30753
30088
  equal(output, "BOTTOM", "all templates were rendered");
30754
30089
  });
30755
30090
 
30756
- // jscs:enable validateIndentation
30757
- }
30758
-
30759
30091
  QUnit.test("should support layouts", function() {
30760
30092
  var template = "{{outlet}}";
30761
30093
  var layout = "<h1>HI</h1>{{yield}}";
30094
+ var routerState = {
30095
+ render: {
30096
+ ViewClass: EmberView['default'].extend({
30097
+ template: compile['default'](template),
30098
+ layout: compile['default'](layout)
30099
+ })
30100
+ },
30101
+ outlets: {}
30102
+ };
30103
+ top.setOutletState(routerState);
30104
+ utils.runAppend(top);
30762
30105
 
30763
- view = EmberView['default'].create({
30764
- template: compile['default'](template),
30765
- layout: compile['default'](layout)
30766
- });
30767
-
30768
- utils.runAppend(view);
30106
+ equal(top.$().text(), 'HI');
30769
30107
 
30770
- equal(view.$().text(), 'HI');
30108
+ routerState.outlets.main = withTemplate("<p>BYE</p>");
30771
30109
 
30772
30110
  run['default'](function() {
30773
- view.connectOutlet('main', EmberView['default'].create({
30774
- template: compile['default']("<p>BYE</p>")
30775
- }));
30111
+ top.setOutletState(routerState);
30776
30112
  });
30113
+
30777
30114
  // Replace whitespace for older IE
30778
- equal(trim(view.$().text()), 'HIBYE');
30115
+ equal(trim(top.$().text()), 'HIBYE');
30779
30116
  });
30780
30117
 
30781
30118
  QUnit.test("should not throw deprecations if {{outlet}} is used without a name", function() {
30782
30119
  expectNoDeprecation();
30783
- view = EmberView['default'].create({
30784
- template: compile['default']("{{outlet}}")
30785
- });
30786
- utils.runAppend(view);
30120
+ top.setOutletState(withTemplate("{{outlet}}"));
30121
+ utils.runAppend(top);
30787
30122
  });
30788
30123
 
30789
30124
  QUnit.test("should not throw deprecations if {{outlet}} is used with a quoted name", function() {
30790
30125
  expectNoDeprecation();
30791
- view = EmberView['default'].create({
30792
- template: compile['default']("{{outlet \"foo\"}}")
30793
- });
30794
- utils.runAppend(view);
30126
+ top.setOutletState(withTemplate("{{outlet \"foo\"}}"));
30127
+ utils.runAppend(top);
30795
30128
  });
30796
30129
 
30797
-
30798
- QUnit.test("should throw an assertion if {{outlet}} used with unquoted name", function() {
30799
- view = EmberView['default'].create({
30800
- template: compile['default']("{{outlet foo}}")
30801
- });
30802
- expectAssertion(function() {
30803
- utils.runAppend(view);
30804
- }, "Using {{outlet}} with an unquoted name is not supported.");
30805
- });
30806
-
30130
+ QUnit.test("should throw an assertion if {{outlet}} used with unquoted name", function() {
30131
+ top.setOutletState(withTemplate("{{outlet foo}}"));
30132
+ expectAssertion(function() {
30133
+ utils.runAppend(top);
30134
+ }, "Using {{outlet}} with an unquoted name is not supported.");
30135
+ });
30136
+
30137
+ function withTemplate(string) {
30138
+ return {
30139
+ render: {
30140
+ template: compile['default'](string)
30141
+ },
30142
+ outlets: {}
30143
+ };
30144
+ }
30145
+
30807
30146
  });
30808
30147
  enifed('ember-routing-htmlbars/tests/helpers/outlet_test.jscs-test', function () {
30809
30148
 
@@ -30825,7 +30164,7 @@ enifed('ember-routing-htmlbars/tests/helpers/outlet_test.jshint', function () {
30825
30164
  });
30826
30165
 
30827
30166
  });
30828
- enifed('ember-routing-htmlbars/tests/helpers/render_test', ['ember-metal/core', 'ember-metal/property_set', 'ember-metal/run_loop', 'ember-metal/platform/define_property', 'ember-metal/mixin', 'ember-runtime/system/namespace', 'ember-runtime/controllers/controller', 'ember-runtime/controllers/array_controller', 'ember-htmlbars/helpers', 'ember-template-compiler/system/compile', 'ember-routing/ext/view', 'ember-views/system/jquery', 'ember-views/system/action_manager', 'ember-routing-htmlbars/helpers/render', 'ember-routing-htmlbars/helpers/action', 'ember-routing-htmlbars/helpers/outlet', 'ember-routing-htmlbars/tests/utils', 'ember-runtime/tests/utils'], function (Ember, property_set, run, define_property, mixin, Namespace, controllers__controller, EmberArrayController, helpers, compile, EmberView, jQuery, ActionManager, render, helpers__action, outlet, utils, tests__utils) {
30167
+ enifed('ember-routing-htmlbars/tests/helpers/render_test', ['ember-metal/core', 'ember-metal/property_set', 'ember-metal/run_loop', 'ember-metal/platform/define_property', 'ember-metal/mixin', 'ember-runtime/system/namespace', 'ember-runtime/controllers/controller', 'ember-runtime/controllers/array_controller', 'ember-htmlbars/helpers', 'ember-template-compiler/system/compile', 'ember-views/views/view', 'ember-views/system/jquery', 'ember-views/system/action_manager', 'ember-routing-htmlbars/helpers/render', 'ember-routing-htmlbars/helpers/action', 'ember-routing-htmlbars/helpers/outlet', 'ember-routing-htmlbars/tests/utils', 'ember-runtime/tests/utils'], function (Ember, property_set, run, define_property, mixin, Namespace, controllers__controller, EmberArrayController, helpers, compile, EmberView, jQuery, ActionManager, render, helpers__action, outlet, utils, tests__utils) {
30829
30168
 
30830
30169
  'use strict';
30831
30170
 
@@ -31232,30 +30571,40 @@ enifed('ember-routing-htmlbars/tests/helpers/render_test', ['ember-metal/core',
31232
30571
  });
31233
30572
 
31234
30573
  QUnit.test("{{render}} helper should be able to render a template again when it was removed", function() {
31235
- var template = "<h1>HI</h1>{{outlet}}";
31236
30574
  var controller = controllers__controller["default"].extend({ container: container });
31237
- view = EmberView['default'].create({
31238
- template: compile['default'](template)
31239
- });
30575
+ var CoreOutlet = container.lookupFactory('view:core-outlet');
30576
+ view = CoreOutlet.create();
30577
+ tests__utils.runAppend(view);
31240
30578
 
31241
30579
  Ember['default'].TEMPLATES['home'] = compile['default']("<p>BYE</p>");
31242
30580
 
31243
- tests__utils.runAppend(view);
30581
+ var liveRoutes = {
30582
+ render: {
30583
+ template: compile['default']("<h1>HI</h1>{{outlet}}")
30584
+ },
30585
+ outlets: {}
30586
+ };
31244
30587
 
31245
30588
  run['default'](function() {
31246
- view.connectOutlet('main', EmberView['default'].create({
31247
- controller: controller.create(),
31248
- template: compile['default']("<div>1{{render 'home'}}</div>")
31249
- }));
30589
+ liveRoutes.outlets.main = {
30590
+ render: {
30591
+ controller: controller.create(),
30592
+ template: compile['default']("<div>1{{render 'home'}}</div>")
30593
+ }
30594
+ };
30595
+ view.setOutletState(liveRoutes);
31250
30596
  });
31251
30597
 
31252
30598
  equal(view.$().text(), 'HI1BYE');
31253
30599
 
31254
30600
  run['default'](function() {
31255
- view.connectOutlet('main', EmberView['default'].create({
31256
- controller: controller.create(),
31257
- template: compile['default']("<div>2{{render 'home'}}</div>")
31258
- }));
30601
+ liveRoutes.outlets.main = {
30602
+ render: {
30603
+ controller: controller.create(),
30604
+ template: compile['default']("<div>2{{render 'home'}}</div>")
30605
+ }
30606
+ };
30607
+ view.setOutletState(liveRoutes);
31259
30608
  });
31260
30609
 
31261
30610
  equal(view.$().text(), 'HI2BYE');
@@ -31301,9 +30650,6 @@ enifed('ember-routing-htmlbars/tests/helpers/render_test', ['ember-metal/core',
31301
30650
  equal(container.lookup('controller:blog.post'), renderedView.get('controller'), 'rendered with correct controller');
31302
30651
  });
31303
30652
 
31304
-
31305
- // jscs:disable validateIndentation
31306
-
31307
30653
  QUnit.test("throws an assertion if {{render}} is called with an unquoted template name", function() {
31308
30654
  var template = '<h1>HI</h1>{{render home}}';
31309
30655
  var controller = controllers__controller["default"].extend({ container: container });
@@ -31334,8 +30680,6 @@ enifed('ember-routing-htmlbars/tests/helpers/render_test', ['ember-metal/core',
31334
30680
  }, "The second argument of {{render}} must be a path, e.g. {{render \"post\" post}}.");
31335
30681
  });
31336
30682
 
31337
- // jscs:enable validateIndentation
31338
-
31339
30683
  });
31340
30684
  enifed('ember-routing-htmlbars/tests/helpers/render_test.jscs-test', function () {
31341
30685
 
@@ -31357,7 +30701,7 @@ enifed('ember-routing-htmlbars/tests/helpers/render_test.jshint', function () {
31357
30701
  });
31358
30702
 
31359
30703
  });
31360
- enifed('ember-routing-htmlbars/tests/utils', ['exports', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-runtime/system/string', 'container/registry', 'ember-runtime/controllers/controller', 'ember-runtime/controllers/object_controller', 'ember-runtime/controllers/array_controller', 'ember-views/views/metamorph_view', 'ember-routing/system/router', 'ember-routing/location/hash_location'], function (exports, property_get, property_set, string, Registry, Controller, ObjectController, ArrayController, _MetamorphView, EmberRouter, HashLocation) {
30704
+ enifed('ember-routing-htmlbars/tests/utils', ['exports', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-runtime/system/string', 'container/registry', 'ember-runtime/controllers/controller', 'ember-runtime/controllers/object_controller', 'ember-runtime/controllers/array_controller', 'ember-views/views/metamorph_view', 'ember-views/views/view', 'ember-routing/system/router', 'ember-routing-views/views/outlet', 'ember-routing/location/hash_location'], function (exports, property_get, property_set, string, Registry, Controller, ObjectController, ArrayController, _MetamorphView, EmberView, EmberRouter, outlet, HashLocation) {
31361
30705
 
31362
30706
  'use strict';
31363
30707
 
@@ -31401,6 +30745,9 @@ enifed('ember-routing-htmlbars/tests/utils', ['exports', 'ember-metal/property_g
31401
30745
  registry.register("controller:array", ArrayController['default'], { instantiate: false });
31402
30746
 
31403
30747
  registry.register("view:default", _MetamorphView['default']);
30748
+ registry.register("view:toplevel", EmberView['default'].extend());
30749
+ registry.register("view:-outlet", outlet.OutletView);
30750
+ registry.register("view:core-outlet", outlet.CoreOutletView);
31404
30751
  registry.register("router:main", EmberRouter['default'].extend());
31405
30752
 
31406
30753
  registry.typeInjection("route", "router", "router:main");
@@ -31449,7 +30796,7 @@ enifed('ember-routing-views.jshint', function () {
31449
30796
  });
31450
30797
 
31451
30798
  });
31452
- enifed('ember-routing-views/tests/main_test', ['ember-routing-views', 'ember-metal/core'], function (__dep0__, Ember) {
30799
+ enifed('ember-routing-views/tests/main_test', ['ember-metal/core'], function (Ember) {
31453
30800
 
31454
30801
  'use strict';
31455
30802
 
@@ -31580,26 +30927,6 @@ enifed('ember-routing/ext/run_loop.jshint', function () {
31580
30927
  ok(true, 'ember-routing/ext/run_loop.js should pass jshint.');
31581
30928
  });
31582
30929
 
31583
- });
31584
- enifed('ember-routing/ext/view.jscs-test', function () {
31585
-
31586
- 'use strict';
31587
-
31588
- module('JSCS - ember-routing/ext');
31589
- test('ember-routing/ext/view.js should pass jscs', function() {
31590
- ok(true, 'ember-routing/ext/view.js should pass jscs.');
31591
- });
31592
-
31593
- });
31594
- enifed('ember-routing/ext/view.jshint', function () {
31595
-
31596
- 'use strict';
31597
-
31598
- module('JSHint - ember-routing/ext');
31599
- test('ember-routing/ext/view.js should pass jshint', function() {
31600
- ok(true, 'ember-routing/ext/view.js should pass jshint.');
31601
- });
31602
-
31603
30930
  });
31604
30931
  enifed('ember-routing/location/api.jscs-test', function () {
31605
30932
 
@@ -52610,9 +51937,6 @@ enifed('ember-template-compiler/tests/system/compile_test', ['ember-template-com
52610
51937
 
52611
51938
  'use strict';
52612
51939
 
52613
-
52614
- // jscs:disable validateIndentation
52615
-
52616
51940
  QUnit.module('ember-htmlbars: compile');
52617
51941
 
52618
51942
  QUnit.test('compiles the provided template with htmlbars', function() {
@@ -52633,8 +51957,22 @@ enifed('ember-template-compiler/tests/system/compile_test', ['ember-template-com
52633
51957
  ok(actual.isMethod === false, 'sets isMethod via template function');
52634
51958
  });
52635
51959
 
52636
- // jscs:enable validateIndentation
52637
-
51960
+ QUnit.test('includes the current revision in the compiled template', function() {
51961
+ var templateString = "{{foo}} -- {{some-bar blah='foo'}}";
51962
+
51963
+ var actual = compile['default'](templateString);
51964
+
51965
+ equal(actual.revision, 'Ember@1.11.0-beta.2', 'revision is included in generated template');
51966
+ });
51967
+
51968
+ QUnit.test('the template revision is different than the HTMLBars default revision', function() {
51969
+ var templateString = "{{foo}} -- {{some-bar blah='foo'}}";
51970
+
51971
+ var actual = compile['default'](templateString);
51972
+ var expected = compiler.compile(templateString);
51973
+
51974
+ ok(actual.revision !== expected.revision, 'revision differs from default');
51975
+ });
52638
51976
 
52639
51977
  });
52640
51978
  enifed('ember-template-compiler/tests/system/compile_test.jscs-test', function () {
@@ -52661,9 +51999,6 @@ enifed('ember-template-compiler/tests/system/template_test', ['ember-template-co
52661
51999
 
52662
52000
  'use strict';
52663
52001
 
52664
-
52665
- // jscs:disable validateIndentation
52666
-
52667
52002
  QUnit.module('ember-htmlbars: template');
52668
52003
 
52669
52004
  QUnit.test('sets `isTop` on the provided function', function() {
@@ -52682,9 +52017,6 @@ enifed('ember-template-compiler/tests/system/template_test', ['ember-template-co
52682
52017
  equal(test.isMethod, false, 'sets isMethod on the provided function');
52683
52018
  });
52684
52019
 
52685
- // jscs:enable validateIndentation
52686
-
52687
-
52688
52020
  });
52689
52021
  enifed('ember-template-compiler/tests/system/template_test.jscs-test', function () {
52690
52022
 
@@ -53572,11 +52904,7 @@ enifed('ember-testing/tests/helpers_test', ['ember-metal/core', 'ember-metal/run
53572
52904
  checkHelperPresent('wait', expected);
53573
52905
  checkHelperPresent('triggerEvent', expected);
53574
52906
 
53575
- if (Ember['default'].FEATURES.isEnabled('ember-testing-checkbox-helpers')) {
53576
- checkHelperPresent('check', expected);
53577
- checkHelperPresent('uncheck', expected);
53578
- }
53579
- }
52907
+ }
53580
52908
 
53581
52909
  function assertNoHelpers(application, helperContainer) {
53582
52910
  assertHelpers(application, helperContainer, false);
@@ -54095,94 +53423,7 @@ enifed('ember-testing/tests/helpers_test', ['ember-metal/core', 'ember-metal/run
54095
53423
  });
54096
53424
  });
54097
53425
 
54098
- if (Ember['default'].FEATURES.isEnabled('ember-testing-checkbox-helpers')) {
54099
- QUnit.test("`check` ensures checkboxes are `checked` state for checkboxes", function() {
54100
- expect(2);
54101
- var check, find, visit, andThen;
54102
-
54103
- App.IndexView = EmberView['default'].extend({
54104
- template: compile['default']('<input type="checkbox" id="unchecked"><input type="checkbox" id="checked" checked>')
54105
- });
54106
-
54107
- run['default'](App, App.advanceReadiness);
54108
-
54109
- check = App.testHelpers.check;
54110
- find = App.testHelpers.find;
54111
- visit = App.testHelpers.visit;
54112
- andThen = App.testHelpers.andThen;
54113
-
54114
- visit('/');
54115
- check('#unchecked');
54116
- check('#checked');
54117
- andThen(function() {
54118
- equal(find('#unchecked').is(":checked"), true, "can check an unchecked checkbox");
54119
- equal(find('#checked').is(":checked"), true, "can check a checked checkbox");
54120
- });
54121
- });
54122
-
54123
- QUnit.test("`uncheck` ensures checkboxes are not `checked`", function() {
54124
- expect(2);
54125
- var uncheck, find, visit, andThen;
54126
-
54127
- App.IndexView = EmberView['default'].extend({
54128
- template: compile['default']('<input type="checkbox" id="unchecked"><input type="checkbox" id="checked" checked>')
54129
- });
54130
-
54131
- run['default'](App, App.advanceReadiness);
54132
-
54133
- uncheck = App.testHelpers.uncheck;
54134
- find = App.testHelpers.find;
54135
- visit = App.testHelpers.visit;
54136
- andThen = App.testHelpers.andThen;
54137
-
54138
- visit('/');
54139
- uncheck('#unchecked');
54140
- uncheck('#checked');
54141
- andThen(function() {
54142
- equal(find('#unchecked').is(":checked"), false, "can uncheck an unchecked checkbox");
54143
- equal(find('#checked').is(":checked"), false, "can uncheck a checked checkbox");
54144
- });
54145
- });
54146
-
54147
- QUnit.test("`check` asserts the selected inputs are checkboxes", function() {
54148
- var check, visit;
54149
-
54150
- App.IndexView = EmberView['default'].extend({
54151
- template: compile['default']('<input type="text" id="text">')
54152
- });
54153
-
54154
- run['default'](App, App.advanceReadiness);
54155
-
54156
- check = App.testHelpers.check;
54157
- visit = App.testHelpers.visit;
54158
-
54159
- visit('/').then(function() {
54160
- expectAssertion(function() {
54161
- check('#text');
54162
- }, /must be a checkbox/);
54163
- });
54164
- });
54165
-
54166
- QUnit.test("`uncheck` asserts the selected inputs are checkboxes", function() {
54167
- var visit, uncheck;
54168
-
54169
- App.IndexView = EmberView['default'].extend({
54170
- template: compile['default']('<input type="text" id="text">')
54171
- });
54172
-
54173
- run['default'](App, App.advanceReadiness);
54174
-
54175
- visit = App.testHelpers.visit;
54176
- uncheck = App.testHelpers.uncheck;
54177
-
54178
- visit('/').then(function() {
54179
- expectAssertion(function() {
54180
- uncheck('#text');
54181
- }, /must be a checkbox/);
54182
- });
54183
- });
54184
- }
54185
-
53426
+
54186
53427
  QUnit.test("`triggerEvent accepts an optional options hash and context", function() {
54187
53428
  expect(3);
54188
53429
 
@@ -54760,6 +54001,46 @@ enifed('ember-views/component_lookup.jshint', function () {
54760
54001
  ok(true, 'ember-views/component_lookup.js should pass jshint.');
54761
54002
  });
54762
54003
 
54004
+ });
54005
+ enifed('ember-views/mixins/attribute_bindings_support.jscs-test', function () {
54006
+
54007
+ 'use strict';
54008
+
54009
+ module('JSCS - ember-views/mixins');
54010
+ test('ember-views/mixins/attribute_bindings_support.js should pass jscs', function() {
54011
+ ok(true, 'ember-views/mixins/attribute_bindings_support.js should pass jscs.');
54012
+ });
54013
+
54014
+ });
54015
+ enifed('ember-views/mixins/attribute_bindings_support.jshint', function () {
54016
+
54017
+ 'use strict';
54018
+
54019
+ module('JSHint - ember-views/mixins');
54020
+ test('ember-views/mixins/attribute_bindings_support.js should pass jshint', function() {
54021
+ ok(true, 'ember-views/mixins/attribute_bindings_support.js should pass jshint.');
54022
+ });
54023
+
54024
+ });
54025
+ enifed('ember-views/mixins/class_names_support.jscs-test', function () {
54026
+
54027
+ 'use strict';
54028
+
54029
+ module('JSCS - ember-views/mixins');
54030
+ test('ember-views/mixins/class_names_support.js should pass jscs', function() {
54031
+ ok(true, 'ember-views/mixins/class_names_support.js should pass jscs.');
54032
+ });
54033
+
54034
+ });
54035
+ enifed('ember-views/mixins/class_names_support.jshint', function () {
54036
+
54037
+ 'use strict';
54038
+
54039
+ module('JSHint - ember-views/mixins');
54040
+ test('ember-views/mixins/class_names_support.js should pass jshint', function() {
54041
+ ok(true, 'ember-views/mixins/class_names_support.js should pass jshint.');
54042
+ });
54043
+
54763
54044
  });
54764
54045
  enifed('ember-views/mixins/component_template_deprecation.jscs-test', function () {
54765
54046
 
@@ -54780,6 +54061,46 @@ enifed('ember-views/mixins/component_template_deprecation.jshint', function () {
54780
54061
  ok(true, 'ember-views/mixins/component_template_deprecation.js should pass jshint.');
54781
54062
  });
54782
54063
 
54064
+ });
54065
+ enifed('ember-views/mixins/instrumentation_support.jscs-test', function () {
54066
+
54067
+ 'use strict';
54068
+
54069
+ module('JSCS - ember-views/mixins');
54070
+ test('ember-views/mixins/instrumentation_support.js should pass jscs', function() {
54071
+ ok(true, 'ember-views/mixins/instrumentation_support.js should pass jscs.');
54072
+ });
54073
+
54074
+ });
54075
+ enifed('ember-views/mixins/instrumentation_support.jshint', function () {
54076
+
54077
+ 'use strict';
54078
+
54079
+ module('JSHint - ember-views/mixins');
54080
+ test('ember-views/mixins/instrumentation_support.js should pass jshint', function() {
54081
+ ok(true, 'ember-views/mixins/instrumentation_support.js should pass jshint.');
54082
+ });
54083
+
54084
+ });
54085
+ enifed('ember-views/mixins/legacy_view_support.jscs-test', function () {
54086
+
54087
+ 'use strict';
54088
+
54089
+ module('JSCS - ember-views/mixins');
54090
+ test('ember-views/mixins/legacy_view_support.js should pass jscs', function() {
54091
+ ok(true, 'ember-views/mixins/legacy_view_support.js should pass jscs.');
54092
+ });
54093
+
54094
+ });
54095
+ enifed('ember-views/mixins/legacy_view_support.jshint', function () {
54096
+
54097
+ 'use strict';
54098
+
54099
+ module('JSHint - ember-views/mixins');
54100
+ test('ember-views/mixins/legacy_view_support.js should pass jshint', function() {
54101
+ ok(true, 'ember-views/mixins/legacy_view_support.js should pass jshint.');
54102
+ });
54103
+
54783
54104
  });
54784
54105
  enifed('ember-views/mixins/normalized_rerender_if_needed.jscs-test', function () {
54785
54106
 
@@ -54800,6 +54121,26 @@ enifed('ember-views/mixins/normalized_rerender_if_needed.jshint', function () {
54800
54121
  ok(true, 'ember-views/mixins/normalized_rerender_if_needed.js should pass jshint.');
54801
54122
  });
54802
54123
 
54124
+ });
54125
+ enifed('ember-views/mixins/template_rendering_support.jscs-test', function () {
54126
+
54127
+ 'use strict';
54128
+
54129
+ module('JSCS - ember-views/mixins');
54130
+ test('ember-views/mixins/template_rendering_support.js should pass jscs', function() {
54131
+ ok(true, 'ember-views/mixins/template_rendering_support.js should pass jscs.');
54132
+ });
54133
+
54134
+ });
54135
+ enifed('ember-views/mixins/template_rendering_support.jshint', function () {
54136
+
54137
+ 'use strict';
54138
+
54139
+ module('JSHint - ember-views/mixins');
54140
+ test('ember-views/mixins/template_rendering_support.js should pass jshint', function() {
54141
+ ok(true, 'ember-views/mixins/template_rendering_support.js should pass jshint.');
54142
+ });
54143
+
54803
54144
  });
54804
54145
  enifed('ember-views/mixins/text_support.jscs-test', function () {
54805
54146
 
@@ -54820,6 +54161,106 @@ enifed('ember-views/mixins/text_support.jshint', function () {
54820
54161
  ok(true, 'ember-views/mixins/text_support.js should pass jshint.');
54821
54162
  });
54822
54163
 
54164
+ });
54165
+ enifed('ember-views/mixins/view_child_views_support.jscs-test', function () {
54166
+
54167
+ 'use strict';
54168
+
54169
+ module('JSCS - ember-views/mixins');
54170
+ test('ember-views/mixins/view_child_views_support.js should pass jscs', function() {
54171
+ ok(true, 'ember-views/mixins/view_child_views_support.js should pass jscs.');
54172
+ });
54173
+
54174
+ });
54175
+ enifed('ember-views/mixins/view_child_views_support.jshint', function () {
54176
+
54177
+ 'use strict';
54178
+
54179
+ module('JSHint - ember-views/mixins');
54180
+ test('ember-views/mixins/view_child_views_support.js should pass jshint', function() {
54181
+ ok(true, 'ember-views/mixins/view_child_views_support.js should pass jshint.');
54182
+ });
54183
+
54184
+ });
54185
+ enifed('ember-views/mixins/view_context_support.jscs-test', function () {
54186
+
54187
+ 'use strict';
54188
+
54189
+ module('JSCS - ember-views/mixins');
54190
+ test('ember-views/mixins/view_context_support.js should pass jscs', function() {
54191
+ ok(true, 'ember-views/mixins/view_context_support.js should pass jscs.');
54192
+ });
54193
+
54194
+ });
54195
+ enifed('ember-views/mixins/view_context_support.jshint', function () {
54196
+
54197
+ 'use strict';
54198
+
54199
+ module('JSHint - ember-views/mixins');
54200
+ test('ember-views/mixins/view_context_support.js should pass jshint', function() {
54201
+ ok(true, 'ember-views/mixins/view_context_support.js should pass jshint.');
54202
+ });
54203
+
54204
+ });
54205
+ enifed('ember-views/mixins/view_keyword_support.jscs-test', function () {
54206
+
54207
+ 'use strict';
54208
+
54209
+ module('JSCS - ember-views/mixins');
54210
+ test('ember-views/mixins/view_keyword_support.js should pass jscs', function() {
54211
+ ok(true, 'ember-views/mixins/view_keyword_support.js should pass jscs.');
54212
+ });
54213
+
54214
+ });
54215
+ enifed('ember-views/mixins/view_keyword_support.jshint', function () {
54216
+
54217
+ 'use strict';
54218
+
54219
+ module('JSHint - ember-views/mixins');
54220
+ test('ember-views/mixins/view_keyword_support.js should pass jshint', function() {
54221
+ ok(true, 'ember-views/mixins/view_keyword_support.js should pass jshint.');
54222
+ });
54223
+
54224
+ });
54225
+ enifed('ember-views/mixins/view_state_support.jscs-test', function () {
54226
+
54227
+ 'use strict';
54228
+
54229
+ module('JSCS - ember-views/mixins');
54230
+ test('ember-views/mixins/view_state_support.js should pass jscs', function() {
54231
+ ok(true, 'ember-views/mixins/view_state_support.js should pass jscs.');
54232
+ });
54233
+
54234
+ });
54235
+ enifed('ember-views/mixins/view_state_support.jshint', function () {
54236
+
54237
+ 'use strict';
54238
+
54239
+ module('JSHint - ember-views/mixins');
54240
+ test('ember-views/mixins/view_state_support.js should pass jshint', function() {
54241
+ ok(true, 'ember-views/mixins/view_state_support.js should pass jshint.');
54242
+ });
54243
+
54244
+ });
54245
+ enifed('ember-views/mixins/view_stream_support.jscs-test', function () {
54246
+
54247
+ 'use strict';
54248
+
54249
+ module('JSCS - ember-views/mixins');
54250
+ test('ember-views/mixins/view_stream_support.js should pass jscs', function() {
54251
+ ok(true, 'ember-views/mixins/view_stream_support.js should pass jscs.');
54252
+ });
54253
+
54254
+ });
54255
+ enifed('ember-views/mixins/view_stream_support.jshint', function () {
54256
+
54257
+ 'use strict';
54258
+
54259
+ module('JSHint - ember-views/mixins');
54260
+ test('ember-views/mixins/view_stream_support.js should pass jshint', function() {
54261
+ ok(true, 'ember-views/mixins/view_stream_support.js should pass jshint.');
54262
+ });
54263
+
54823
54264
  });
54824
54265
  enifed('ember-views/mixins/view_target_action_support.jscs-test', function () {
54825
54266
 
@@ -54840,6 +54281,26 @@ enifed('ember-views/mixins/view_target_action_support.jshint', function () {
54840
54281
  ok(true, 'ember-views/mixins/view_target_action_support.js should pass jshint.');
54841
54282
  });
54842
54283
 
54284
+ });
54285
+ enifed('ember-views/mixins/visibility_support.jscs-test', function () {
54286
+
54287
+ 'use strict';
54288
+
54289
+ module('JSCS - ember-views/mixins');
54290
+ test('ember-views/mixins/visibility_support.js should pass jscs', function() {
54291
+ ok(true, 'ember-views/mixins/visibility_support.js should pass jscs.');
54292
+ });
54293
+
54294
+ });
54295
+ enifed('ember-views/mixins/visibility_support.jshint', function () {
54296
+
54297
+ 'use strict';
54298
+
54299
+ module('JSHint - ember-views/mixins');
54300
+ test('ember-views/mixins/visibility_support.js should pass jshint', function() {
54301
+ ok(true, 'ember-views/mixins/visibility_support.js should pass jshint.');
54302
+ });
54303
+
54843
54304
  });
54844
54305
  enifed('ember-views/streams/class_name_binding.jscs-test', function () {
54845
54306
 
@@ -57866,7 +57327,7 @@ enifed('ember-views/tests/views/container_view_test', ['ember-metal/property_get
57866
57327
  container.removeObject(view);
57867
57328
  });
57868
57329
  equal(property_get.get(view, 'childViews.length'), 0, "child views are cleared when removed from container view");
57869
- equal(container.$().html(), '', "the child view is removed from the DOM");
57330
+ equal(container.$().text(), '', "the child view is removed from the DOM");
57870
57331
  });
57871
57332
 
57872
57333
  QUnit.test("if a ContainerView starts with an empty currentView, nothing is displayed", function() {
@@ -65384,7 +64845,9 @@ enifed('ember/tests/component_registration_test', ['ember', 'ember-template-comp
65384
64845
 
65385
64846
  function cleanup() {
65386
64847
  Ember.run(function() {
65387
- App.destroy();
64848
+ if (App) {
64849
+ App.destroy();
64850
+ }
65388
64851
  App = null;
65389
64852
  Ember.TEMPLATES = {};
65390
64853
 
@@ -65549,21 +65012,14 @@ enifed('ember/tests/component_registration_test', ['ember', 'ember-template-comp
65549
65012
  equal(Ember.$('#wrapper').text(), "inner-outer", "The component is composed correctly");
65550
65013
  });
65551
65014
 
65552
- if (!Ember.FEATURES.isEnabled('ember-htmlbars')) {
65553
- // jscs:disable validateIndentation
65554
- // ember-htmlbars doesn't throw an exception when a helper is not found
65555
-
65556
65015
  QUnit.test('Using name of component that does not exist', function () {
65557
65016
  Ember.TEMPLATES.application = compile['default']("<div id='wrapper'>{{#no-good}} {{/no-good}}</div>");
65558
65017
 
65559
- throws(function () {
65018
+ expectAssertion(function () {
65560
65019
  boot();
65561
- }, /Could not find component or helper named 'no-good'/);
65020
+ }, /A helper named `no-good` could not be found/);
65562
65021
  });
65563
65022
 
65564
- // jscs:enable validateIndentation
65565
- }
65566
-
65567
65023
  QUnit.module("Application Lifecycle - Component Context", {
65568
65024
  setup: prepare,
65569
65025
  teardown: cleanup
@@ -65777,7 +65233,10 @@ enifed('ember/tests/helpers/helper_registration_test', ['ember', 'ember-htmlbars
65777
65233
  QUnit.module("Application Lifecycle - Helper Registration", {
65778
65234
  teardown: function() {
65779
65235
  Ember.run(function() {
65780
- App.destroy();
65236
+ if (App) {
65237
+ App.destroy();
65238
+ }
65239
+
65781
65240
  App = null;
65782
65241
  Ember.TEMPLATES = {};
65783
65242
  });
@@ -65840,41 +65299,28 @@ enifed('ember/tests/helpers/helper_registration_test', ['ember', 'ember-htmlbars
65840
65299
  ok(!helpers['x-reverse'], "Container-registered helper doesn't wind up on global helpers hash");
65841
65300
  });
65842
65301
 
65843
- if (!Ember.FEATURES.isEnabled('ember-htmlbars')) {
65844
- // jscs:disable validateIndentation
65845
-
65846
65302
  // we have unit tests for this in ember-htmlbars/tests/system/lookup-helper
65847
65303
  // and we are not going to recreate the handlebars helperMissing concept
65848
65304
  QUnit.test("Undashed helpers registered on the container can not (presently) be invoked", function() {
65849
65305
 
65850
- var realHelperMissing = helpers.helperMissing;
65851
- helpers.helperMissing = function() {
65852
- return "NOHALPER";
65853
- };
65854
-
65855
65306
  // Note: the reason we're not allowing undashed helpers is to avoid
65856
65307
  // a possible perf hit in hot code paths, i.e. _triageMustache.
65857
65308
  // We only presently perform container lookups if prop.indexOf('-') >= 0
65858
65309
 
65859
65310
  Ember.TEMPLATES.application = compile("<div id='wrapper'>{{omg}}|{{omg 'GRRR'}}|{{yorp}}|{{yorp 'ahh'}}</div>");
65860
65311
 
65861
- boot(function() {
65862
- registry.register('helper:omg', function() {
65863
- return "OMG";
65312
+ expectAssertion(function() {
65313
+ boot(function() {
65314
+ registry.register('helper:omg', function() {
65315
+ return "OMG";
65316
+ });
65317
+ registry.register('helper:yorp', makeBoundHelper(function() {
65318
+ return "YORP";
65319
+ }));
65864
65320
  });
65865
- registry.register('helper:yorp', makeBoundHelper(function() {
65866
- return "YORP";
65867
- }));
65868
- });
65869
-
65870
- equal(Ember.$('#wrapper').text(), "|NOHALPER||NOHALPER", "The undashed helper was invoked from the container");
65871
-
65872
- helpers.helperMissing = realHelperMissing;
65321
+ }, /A helper named 'omg' could not be found/);
65873
65322
  });
65874
65323
 
65875
- // jscs:enable validateIndentation
65876
- }
65877
-
65878
65324
  });
65879
65325
  enifed('ember/tests/helpers/helper_registration_test.jscs-test', function () {
65880
65326
 
@@ -68018,28 +67464,6 @@ enifed('ember/tests/routing/basic_test', ['ember', 'ember-metal/enumerable_utils
68018
67464
  equal(Ember.$('h3:contains(Hours)', '#qunit-fixture').length, 1, "The home template was rendered");
68019
67465
  });
68020
67466
 
68021
- QUnit.test("The Homepage register as activeView", function() {
68022
- Router.map(function() {
68023
- this.route("home", { path: "/" });
68024
- this.route("homepage");
68025
- });
68026
-
68027
- App.HomeRoute = Ember.Route.extend({
68028
- });
68029
-
68030
- App.HomepageRoute = Ember.Route.extend({
68031
- });
68032
-
68033
- bootApplication();
68034
-
68035
- ok(router._lookupActiveView('home'), '`home` active view is connected');
68036
-
68037
- handleURL('/homepage');
68038
-
68039
- ok(router._lookupActiveView('homepage'), '`homepage` active view is connected');
68040
- equal(router._lookupActiveView('home'), undefined, '`home` active view is disconnected');
68041
- });
68042
-
68043
67467
  QUnit.test("The Homepage with explicit template name in renderTemplate", function() {
68044
67468
  Router.map(function() {
68045
67469
  this.route("home", { path: "/" });
@@ -70416,6 +69840,22 @@ enifed('ember/tests/routing/basic_test', ['ember', 'ember-metal/enumerable_utils
70416
69840
  });
70417
69841
 
70418
69842
 
69843
+ QUnit.test("Route will assert if you try to explicitly render {into: ...} a missing template", function () {
69844
+ Router.map(function() {
69845
+ this.route("home", { path: "/" });
69846
+ });
69847
+
69848
+ App.HomeRoute = Ember.Route.extend({
69849
+ renderTemplate: function() {
69850
+ this.render({ into: 'nonexistent' });
69851
+ }
69852
+ });
69853
+
69854
+ expectAssertion(function() {
69855
+ bootApplication();
69856
+ }, "You attempted to render into 'nonexistent' but it was not found");
69857
+ });
69858
+
70419
69859
  QUnit.test("Route supports clearing outlet explicitly", function() {
70420
69860
  Ember.TEMPLATES.application = compile("{{outlet}}{{outlet 'modal'}}");
70421
69861
  Ember.TEMPLATES.posts = compile("{{outlet}}");
@@ -71285,6 +70725,160 @@ enifed('ember/tests/routing/basic_test', ['ember', 'ember-metal/enumerable_utils
71285
70725
  }, /\bboom\b/);
71286
70726
  });
71287
70727
 
70728
+ QUnit.test("{{outlet}} works when created after initial render", function() {
70729
+ Ember.TEMPLATES.sample = compile("Hi{{#if showTheThing}}{{outlet}}{{/if}}Bye");
70730
+ Ember.TEMPLATES['sample/inner'] = compile("Yay");
70731
+ Ember.TEMPLATES['sample/inner2'] = compile("Boo");
70732
+ Router.map(function() {
70733
+ this.route('sample', { path: '/' }, function() {
70734
+ this.route('inner', { path: '/' });
70735
+ this.route('inner2', { path: '/2' });
70736
+ });
70737
+ });
70738
+
70739
+ bootApplication();
70740
+
70741
+ equal(Ember.$('#qunit-fixture').text(), "HiBye", "initial render");
70742
+
70743
+ Ember.run(function() {
70744
+ container.lookup('controller:sample').set('showTheThing', true);
70745
+ });
70746
+
70747
+ equal(Ember.$('#qunit-fixture').text(), "HiYayBye", "second render");
70748
+
70749
+ handleURL('/2');
70750
+
70751
+ equal(Ember.$('#qunit-fixture').text(), "HiBooBye", "third render");
70752
+ });
70753
+
70754
+ QUnit.test("Can rerender application view multiple times when it contains an outlet", function() {
70755
+ Ember.TEMPLATES.application = compile("App{{outlet}}");
70756
+ Ember.TEMPLATES.index = compile("Hello world");
70757
+
70758
+ registry.register('view:application', Ember.View.extend({
70759
+ elementId: 'im-special'
70760
+ }));
70761
+
70762
+ bootApplication();
70763
+
70764
+ equal(Ember.$('#qunit-fixture').text(), "AppHello world", "initial render");
70765
+
70766
+ Ember.run(function() {
70767
+ Ember.View.views['im-special'].rerender();
70768
+ });
70769
+
70770
+ equal(Ember.$('#qunit-fixture').text(), "AppHello world", "second render");
70771
+
70772
+ Ember.run(function() {
70773
+ Ember.View.views['im-special'].rerender();
70774
+ });
70775
+
70776
+ equal(Ember.$('#qunit-fixture').text(), "AppHello world", "third render");
70777
+ });
70778
+
70779
+ QUnit.test("Can render into a named outlet at the top level", function() {
70780
+ Ember.TEMPLATES.application = compile("A-{{outlet}}-B-{{outlet \"other\"}}-C");
70781
+ Ember.TEMPLATES.modal = compile("Hello world");
70782
+ Ember.TEMPLATES.index = compile("The index");
70783
+
70784
+ registry.register('route:application', Ember.Route.extend({
70785
+ renderTemplate: function() {
70786
+ this.render();
70787
+ this.render('modal', {
70788
+ into: 'application',
70789
+ outlet: 'other'
70790
+ });
70791
+ }
70792
+ }));
70793
+
70794
+ bootApplication();
70795
+
70796
+ equal(Ember.$('#qunit-fixture').text(), "A-The index-B-Hello world-C", "initial render");
70797
+ });
70798
+
70799
+ QUnit.test("Can disconnect a named outlet at the top level", function() {
70800
+ Ember.TEMPLATES.application = compile("A-{{outlet}}-B-{{outlet \"other\"}}-C");
70801
+ Ember.TEMPLATES.modal = compile("Hello world");
70802
+ Ember.TEMPLATES.index = compile("The index");
70803
+
70804
+ registry.register('route:application', Ember.Route.extend({
70805
+ renderTemplate: function() {
70806
+ this.render();
70807
+ this.render('modal', {
70808
+ into: 'application',
70809
+ outlet: 'other'
70810
+ });
70811
+ },
70812
+ actions: {
70813
+ banish: function() {
70814
+ this.disconnectOutlet({
70815
+ parentView: 'application',
70816
+ outlet: 'other'
70817
+ });
70818
+ }
70819
+ }
70820
+ }));
70821
+
70822
+ bootApplication();
70823
+
70824
+ equal(Ember.$('#qunit-fixture').text(), "A-The index-B-Hello world-C", "initial render");
70825
+
70826
+ Ember.run(router, 'send', 'banish');
70827
+
70828
+ equal(Ember.$('#qunit-fixture').text(), "A-The index-B--C", "second render");
70829
+ });
70830
+
70831
+ QUnit.test("Can render into a named outlet at the top level, with empty main outlet", function() {
70832
+ Ember.TEMPLATES.application = compile("A-{{outlet}}-B-{{outlet \"other\"}}-C");
70833
+ Ember.TEMPLATES.modal = compile("Hello world");
70834
+
70835
+ Router.map(function() {
70836
+ this.route('hasNoTemplate', { path: '/' });
70837
+ });
70838
+
70839
+ registry.register('route:application', Ember.Route.extend({
70840
+ renderTemplate: function() {
70841
+ this.render();
70842
+ this.render('modal', {
70843
+ into: 'application',
70844
+ outlet: 'other'
70845
+ });
70846
+ }
70847
+ }));
70848
+
70849
+ bootApplication();
70850
+
70851
+ equal(Ember.$('#qunit-fixture').text(), "A--B-Hello world-C", "initial render");
70852
+ });
70853
+
70854
+
70855
+ QUnit.test("Can render into a named outlet at the top level, later", function() {
70856
+ Ember.TEMPLATES.application = compile("A-{{outlet}}-B-{{outlet \"other\"}}-C");
70857
+ Ember.TEMPLATES.modal = compile("Hello world");
70858
+ Ember.TEMPLATES.index = compile("The index");
70859
+
70860
+ registry.register('route:application', Ember.Route.extend({
70861
+ actions: {
70862
+ launch: function() {
70863
+ this.render('modal', {
70864
+ into: 'application',
70865
+ outlet: 'other'
70866
+ });
70867
+ }
70868
+ }
70869
+ }));
70870
+
70871
+ bootApplication();
70872
+
70873
+ equal(Ember.$('#qunit-fixture').text(), "A-The index-B--C", "initial render");
70874
+
70875
+ Ember.run(router, 'send', 'launch');
70876
+
70877
+ //debugger;
70878
+ //router._setOutlets();
70879
+ equal(Ember.$('#qunit-fixture').text(), "A-The index-B-Hello world-C", "second render");
70880
+ });
70881
+
71288
70882
  });
71289
70883
  enifed('ember/tests/routing/basic_test.jscs-test', function () {
71290
70884