Sha256: 7a65316d474ccb75deb121f9836b7b7a504b5c98d9e7cf29206e703ec400e692
Contents?: true
Size: 918 Bytes
Versions: 37
Compression:
Stored size: 918 Bytes
Contents
Screw.Unit(function() { describe('Man', function() { var man; before(function() { man = new Man({luck: 5}); }); describe('#decrement_luck', function() { it("decrements the luck field by the given amount", function() { man.decrement_luck(3); expect(man.luck()).to(equal, 2) }); describe('when the decrement exceeds the luck balance', function() { it("decrements the luck field to zero", function() { man.decrement_luck(10000000000); expect(man.luck()).to(equal, 0); }); }); }); describe('@click', function() { before(function() { $('#dom_test').append(man.render()); }); it("removes the man's hair", function() { expect($('.man')).to(have, '.hair'); $('.man').click(); expect($('.man')).to_not(have, '.hair'); }); }); }); });
Version data entries
37 entries across 37 versions & 8 rubygems