Sha256: 4bc3c2359d2a2969e7a38a2baceb559179e8977c8c43f80613311acd31736090
Contents?: true
Size: 1.02 KB
Versions: 7
Compression:
Stored size: 1.02 KB
Contents
/* --- name: Hash.Cookie Tests requires: [More/Hash.Cookie] provides: [Hash.Cookie.Tests] ... */ describe('Hash.Cookie', { 'Saves a set of key/values into a cookie': function(){ var hc = new Hash.Cookie('HCtest'); hc.set('foo', 'bar'); hc.extend({ apple: 'red', lemon: 'yellow' }); expect(hc.get('apple')).toEqual('red'); }, 'Retrieves a Hash.Cookie': function(){ var hc = new Hash.Cookie('HCtest'); expect(hc.get('apple')).toEqual('red'); }, 'Removes a Hash.Cookie': function(){ var hc1 = new Hash.Cookie('HCtest'); hc1.dispose(); var hc2 = new Hash.Cookie('HCtest'); expect(hc2.get('apple')).toEqual(null); } }); describe('Color properties', { 'Should define the rgb value for a color': function(){ expect(new Color("#ff00ff").rgb).toEqual([255,0,255]); }, 'Should define the hsb value for a color': function(){ expect(new Color("#ff00ff").hsb).toEqual([300, 100, 100]); }, 'Should define the hex value for a color': function(){ expect(new Color([255,0,255]).hex).toEqual("#ff00ff"); } });
Version data entries
7 entries across 7 versions & 1 rubygems