Sha256: 564521aea970841e28dde49d4a3e1ed27822bb49e037b969cf412ddde7bcb2ea

Contents?: true

Size: 1.15 KB

Versions: 146

Compression:

Stored size: 1.15 KB

Contents

component extends="testbox.system.BaseSpec" {

	function beforeAll(){
	  SUT = createObject( 'SpaceAge' );
	}

	function run(){
	
		describe( "My SpaceAge class", function(){			

			it( 'age on Earth', function(){
				expect( SUT.age( planet='Earth', seconds='1000000000' ) ).toBe( '31.69' );
			});

			it( 'age on Mercury', function(){
				expect( SUT.age( planet='Mercury', seconds='2134835688' ) ).toBe( '280.88' );
			});

			it( 'age on Venus', function(){
				expect( SUT.age( planet='Venus', seconds='189839836' ) ).toBe( '9.78' );
			});

			it( 'age on Mars', function(){
				expect( SUT.age( planet='Mars', seconds='2329871239' ) ).toBe( '39.25' );
			});

			it( 'age on Jupiter', function(){
				expect( SUT.age( planet='Jupiter', seconds='901876382' ) ).toBe( '2.41' );
			});

			it( 'age on Saturn', function(){
				expect( SUT.age( planet='Saturn', seconds='3000000000' ) ).toBe( '3.23' );
			});

			it( 'age on Uranus', function(){
				expect( SUT.age( planet='Uranus', seconds='3210123456' ) ).toBe( '1.21' );
			});

			it( 'age on Neptune', function(){
				expect( SUT.age( planet='Neptune', seconds='8210123456' ) ).toBe( '1.58' );
			});

		});
		
	}
 
}

Version data entries

146 entries across 145 versions & 1 rubygems

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