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

Version Path
trackler-2.2.1.180 tracks/cfml/exercises/nth-prime/NthPrimeTest.cfc
trackler-2.2.1.179 tracks/cfml/exercises/nth-prime/NthPrimeTest.cfc
trackler-2.2.1.178 tracks/cfml/exercises/nth-prime/NthPrimeTest.cfc
trackler-2.2.1.177 tracks/cfml/exercises/nth-prime/NthPrimeTest.cfc
trackler-2.2.1.176 tracks/cfml/exercises/nth-prime/NthPrimeTest.cfc
trackler-2.2.1.175 tracks/cfml/exercises/nth-prime/NthPrimeTest.cfc
trackler-2.2.1.174 tracks/cfml/exercises/nth-prime/NthPrimeTest.cfc
trackler-2.2.1.173 tracks/cfml/exercises/nth-prime/NthPrimeTest.cfc
trackler-2.2.1.172 tracks/cfml/exercises/nth-prime/NthPrimeTest.cfc
trackler-2.2.1.171 tracks/cfml/exercises/nth-prime/NthPrimeTest.cfc
trackler-2.2.1.170 tracks/cfml/exercises/nth-prime/NthPrimeTest.cfc
trackler-2.2.1.169 tracks/cfml/exercises/nth-prime/NthPrimeTest.cfc
trackler-2.2.1.167 tracks/cfml/exercises/nth-prime/NthPrimeTest.cfc
trackler-2.2.1.166 tracks/cfml/exercises/nth-prime/NthPrimeTest.cfc
trackler-2.2.1.165 tracks/cfml/exercises/nth-prime/NthPrimeTest.cfc
trackler-2.2.1.164 tracks/cfml/exercises/nth-prime/NthPrimeTest.cfc
trackler-2.2.1.163 tracks/cfml/exercises/nth-prime/NthPrimeTest.cfc
trackler-2.2.1.162 tracks/cfml/exercises/nth-prime/NthPrimeTest.cfc
trackler-2.2.1.161 tracks/cfml/exercises/nth-prime/NthPrimeTest.cfc
trackler-2.2.1.160 tracks/cfml/exercises/nth-prime/NthPrimeTest.cfc