Skip to content

Commit

Permalink
Fixed test names and removed duplicates
Browse files Browse the repository at this point in the history
  • Loading branch information
wagenet committed Apr 5, 2011
1 parent 4cdb67e commit f159660
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 38 deletions.
2 changes: 1 addition & 1 deletion frameworks/runtime/tests/core/guidFor.js
Expand Up @@ -50,7 +50,7 @@ test("numbers", function() {
nanGuid( a );
});

test("numbers", function() {
test("booleans", function() {
var a = true, aprime = true, b = false;

sameGuid( a, a, "same booleans always yields same guid" );
Expand Down
34 changes: 0 additions & 34 deletions frameworks/runtime/tests/mixins/enumerable/enumerable.js
Expand Up @@ -520,40 +520,6 @@ test("should trigger observer of reduced prop when array changes once property r
}
});

test("should trigger observer of reduced prop when array changes once property retrieved once", function() {
var src, ary2 = enumerables ;
for (var idx2=0, len2=ary2.length; idx2<len2; idx2++) {
src = ary2[idx2] ;
// get the property...this will install the reducer property...
src.get("@max(balance)") ;

// install observer
var observedValue = null ;
src.addObserver("@max(balance)", function() {
observedValue = src.get("@max(balance)");
}) ;

//src.addProbe('[]') ;
//src.addProbe('@max(balance)');

// add record to array
src.pushObject({
first: "John",
gender: "male",
californian: NO,
ready: YES,
visited: "Paris",
balance: 5
}) ;

//SC.NotificationQueue.flush() ; // force observers to trigger

// observed value should now be set because the reduced property observer
// was triggered when we changed the array contents.
equals(5, observedValue, "observedValue") ;
}
});


test("should trigger observer of reduced prop when array changes - even if you never retrieved the property before", function() {
var src, ary2 = enumerables ;
Expand Down
Expand Up @@ -68,7 +68,7 @@ test("should increment the indicator before begining the changes to the object",
equals(ObjectA.beginPropertyChanges()._kvo_changeLevel, 1) ;
});

test("should increment the indicator before begining the changes to the object", function() {
test("should decrement the indicator after ending the changes to the object", function() {
equals(ObjectA.endPropertyChanges()._kvo_changeLevel, 0) ;
});

Expand Down
2 changes: 1 addition & 1 deletion frameworks/runtime/tests/mixins/propertyChanges.js
Expand Up @@ -54,7 +54,7 @@ test("should increment the indicator before begining the changes to the object",
equals(ObjectA.beginPropertyChanges()._kvo_changeLevel, 1) ;
});

test("should increment the indicator before begining the changes to the object", function() {
test("should decrement the indicator after ending the changes to the object", function() {
equals(ObjectA.endPropertyChanges()._kvo_changeLevel, 0) ;
});

Expand Down
5 changes: 5 additions & 0 deletions frameworks/runtime/tests/system/object/bindings.js
Expand Up @@ -103,13 +103,18 @@ test("bind(*extraObject.foo) should create locally chained binding", function()
equals("extraObjectValue", testObject.get("foo"), "testObject.foo") ;
});


test("bind(*extraObject.foo) should be disconnectable");
// The following contains no test
/*
test("bind(*extraObject.foo) should be disconnectable", function() {
var binding = testObject.bind("foo", "*extraObject.foo");
SC.Binding.flushPendingChanges() ; // actually sets up up the binding
binding.disconnect();
SC.Binding.flushPendingChanges() ;
});
*/

module("fooBinding method", {

Expand Down
2 changes: 1 addition & 1 deletion frameworks/runtime/tests/system/object/enhance.js
Expand Up @@ -91,7 +91,7 @@ test("calling sc_super inside a reopened class", function() {
equals(obj.loudly("foo"), "OHAI: ZOMG HAHA FOO!");
});

test("calling sc_super inside a reopened class", function() {
test("calling sc_super inside a reopened class, reverse", function() {
var Klass = SC.Object.extend();

var object = Klass.create({
Expand Down

0 comments on commit f159660

Please sign in to comment.