Sha256: 2f071ec3465b30e8dc49830ad7f1e3eef9a7aa5090adf5218f6bcb2b4c1616a4
Contents?: true
Size: 730 Bytes
Versions: 74
Compression:
Stored size: 730 Bytes
Contents
component extends="testbox.system.BaseSpec" { function beforeAll(){ SUT = createObject( 'NthPrime' ); } function run(){ describe( "My NthPrime class", function(){ it( 'first prime', function(){ expect( SUT.prime( number='1' ) ).toBe( '2' ); }); it( 'second prime', function(){ expect( SUT.prime( number='2' ) ).toBe( '3' ); }); it( 'sixth prime', function(){ expect( SUT.prime( number='6' ) ).toBe( '13' ); }); it( 'big prime', function(){ expect( SUT.prime( number='10001' ) ).toBe( '104743' ); }); it( 'there is no zeroth prime', function(){ expect( function(){ SUT.prime( number='0' ); } ).toThrow( message='there is no zeroth prime' ); }); }); } }
Version data entries
74 entries across 74 versions & 1 rubygems