Skip to content

Instantly share code, notes, and snippets.

@bmoeskau
Created June 25, 2011 06:26
Show Gist options
  • Select an option

  • Save bmoeskau/1046235 to your computer and use it in GitHub Desktop.

Select an option

Save bmoeskau/1046235 to your computer and use it in GitHub Desktop.
Ext.override('ClassToOverride', {
someMethod: function() {
return 'overridden';
}
});
var theClass = Ext.define('ClassToOverride', {
someMethod: function() {
return 'original';
},
anotherMethod: function() {
return 'another';
}
});
var obj = Ext.create(theClass);
expect(obj.someMethod()).toEqual('overridden');
expect(obj.anotherMethod()).toEqual('another');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment