Sha256: d8ec268b5a71312a3c5b6bffe162b64b9871d10613f81fe1acf49d27905ace6b
Contents?: true
Size: 1.31 KB
Versions: 72
Compression:
Stored size: 1.31 KB
Contents
component extends="testbox.system.BaseSpec" { function beforeAll(){ SUT = createObject( 'ScrabbleScore' ); } function run(){ describe( "My ScrabbleScore class", function(){ it( 'lowercase letter', function(){ expect( SUT.score( input='a' ) ).toBe( '1' ); }); it( 'uppercase letter', function(){ expect( SUT.score( input='A' ) ).toBe( '1' ); }); it( 'valuable letter', function(){ expect( SUT.score( input='f' ) ).toBe( '4' ); }); it( 'short word', function(){ expect( SUT.score( input='at' ) ).toBe( '2' ); }); it( 'short, valuable word', function(){ expect( SUT.score( input='zoo' ) ).toBe( '12' ); }); it( 'medium word', function(){ expect( SUT.score( input='street' ) ).toBe( '6' ); }); it( 'medium, valuable word', function(){ expect( SUT.score( input='quirky' ) ).toBe( '22' ); }); it( 'long, mixed-case word', function(){ expect( SUT.score( input='OxyphenButazone' ) ).toBe( '41' ); }); it( 'english-like word', function(){ expect( SUT.score( input='pinata' ) ).toBe( '8' ); }); it( 'empty input', function(){ expect( SUT.score( input='' ) ).toBe( '0' ); }); it( 'entire alphabet available', function(){ expect( SUT.score( input='abcdefghijklmnopqrstuvwxyz' ) ).toBe( '87' ); }); }); } }
Version data entries
72 entries across 71 versions & 1 rubygems