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.159 tracks/cfml/exercises/nth-prime/NthPrimeTest.cfc
trackler-2.2.1.158 tracks/cfml/exercises/nth-prime/NthPrimeTest.cfc
trackler-2.2.1.157 tracks/cfml/exercises/nth-prime/NthPrimeTest.cfc
trackler-2.2.1.156 tracks/cfml/exercises/nth-prime/NthPrimeTest.cfc
trackler-2.2.1.155 tracks/cfml/exercises/nth-prime/NthPrimeTest.cfc
trackler-2.2.1.154 tracks/cfml/exercises/nth-prime/NthPrimeTest.cfc
trackler-2.2.1.153 tracks/cfml/exercises/nth-prime/NthPrimeTest.cfc
trackler-2.2.1.152 tracks/cfml/exercises/nth-prime/NthPrimeTest.cfc
trackler-2.2.1.151 tracks/cfml/exercises/nth-prime/NthPrimeTest.cfc
trackler-2.2.1.150 tracks/cfml/exercises/nth-prime/NthPrimeTest.cfc
trackler-2.2.1.149 tracks/cfml/exercises/nth-prime/NthPrimeTest.cfc
trackler-2.2.1.148 tracks/cfml/exercises/nth-prime/NthPrimeTest.cfc
trackler-2.2.1.147 tracks/cfml/exercises/nth-prime/NthPrimeTest.cfc
trackler-2.2.1.146 tracks/cfml/exercises/nth-prime/NthPrimeTest.cfc
trackler-2.2.1.145 tracks/cfml/exercises/nth-prime/NthPrimeTest.cfc
trackler-2.2.1.144 tracks/cfml/exercises/nth-prime/NthPrimeTest.cfc
trackler-2.2.1.143 tracks/cfml/exercises/nth-prime/NthPrimeTest.cfc
trackler-2.2.1.142 tracks/cfml/exercises/nth-prime/NthPrimeTest.cfc
trackler-2.2.1.141 tracks/cfml/exercises/nth-prime/NthPrimeTest.cfc
trackler-2.2.1.140 tracks/cfml/exercises/nth-prime/NthPrimeTest.cfc