Sha256: b2e357d6c514d6e39db00298bf6bed412445bd808e5b98d105a634b0183f9e25
Contents?: true
Size: 551 Bytes
Versions: 19
Compression:
Stored size: 551 Bytes
Contents
Smoke.Stub = function(obj,attr) { this.obj = obj; this.attribute = attr; this.and_return(this.defaultReturn); }; Smoke.Stub.prototype = { defaultReturn: null, property: function(p){ this.property = p; this.and_set_to(this.defaultReturn); return this }, method: function(f){ this.func = f; this.and_return(this.defaultReturn); return this }, and_return: function(v){ this.obj[this.attribute] = function() { return v }; return this.obj }, and_set_to: function(v){ this.obj[this.attribute] = v; return this.obj } };
Version data entries
19 entries across 19 versions & 4 rubygems