Skip to content

Commit

Permalink
Fix and renenable disabled Array#replace test
Browse files Browse the repository at this point in the history
  • Loading branch information
wagenet committed May 12, 2012
1 parent 4d3091c commit 2c9e305
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/ember-runtime/tests/suites/mutable_array/replace.js
Expand Up @@ -98,7 +98,7 @@ suite.test("[A,B].replace(1,0,[X,Y]) => [A,X,Y,B] + notify", function() {
equal(observer.validate('lastObject'), false, 'should NOT have notified lastObject once');
});

suite.notest("[A,B,C,D].replace(2,2) => [A,B] + notify", function() {
suite.test("[A,B,C,D].replace(2,2) => [A,B] + notify", function() {
var obj, observer, before, replace, after;

before = this.newFixture(4);
Expand All @@ -108,16 +108,16 @@ suite.notest("[A,B,C,D].replace(2,2) => [A,B] + notify", function() {
observer = this.newObserver(obj, '[]', '@each', 'length', 'firstObject', 'lastObject');
obj.getProperties('firstObject', 'lastObject'); /* Prime the cache */

obj.replace(2,2) ;
obj.replace(2,2);

deepEqual(this.toArray(obj), after, 'post item results');

equal(observer.timesCalled('[]'), 1, 'should have notified [] once');
equal(observer.timesCalled('@each'), 1, 'should have notified @each once');
equal(observer.timesCalled('length'), 1, 'should have notified length once');
equal(observer.timesCalled('lastObject'), 1, 'should have notified lastObject once');

equal(observer.validate('firstObject'), false, 'should NOT have notified firstObject once');
equal(observer.validate('lastObject'), false, 'should NOT have notified lastObject once');
});

suite.test('Adding object should notify enumerable observer', function() {
Expand Down

0 comments on commit 2c9e305

Please sign in to comment.