Sha256: a50780b6fb62fa5236fa9b500d5a730b853fdd1457807c2c105d9ee172579ce5
Contents?: true
Size: 467 Bytes
Versions: 7
Compression:
Stored size: 467 Bytes
Contents
Screw.Unit(function() { describe("stubbing", function() { before(function() { foo = {bar: function(attribute){return 'hello'}, baz:'goodbye'}; }); it("should return the stubbed value of a property", function() { stub(foo,'baz').and_set_to('baz'); expect(foo.baz).to(equal, 'baz'); }); it("should return the stubbed value of a function", function() { stub(foo,'bar').and_return('bar'); expect(foo.bar()).to(equal, 'bar'); }); }); });
Version data entries
7 entries across 7 versions & 1 rubygems