Sha256: 478d40ad822f3576f7ef583c54e895c88978609e3c60585ab055bd2656a0f578

Contents?: true

Size: 1.01 KB

Versions: 72

Compression:

Stored size: 1.01 KB

Contents

component extends="testbox.system.BaseSpec" {

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

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

			describe( 'Abbreviate a phrase', function(){

				it( 'basic', function(){
					expect( SUT.abbreviate( phrase='Portable Network Graphics' ) ).toBe( 'PNG' );
				});

				it( 'lowercase words', function(){
					expect( SUT.abbreviate( phrase='Ruby on Rails' ) ).toBe( 'ROR' );
				});

				it( 'punctuation', function(){
					expect( SUT.abbreviate( phrase='First In,  First Out' ) ).toBe( 'FIFO' );
				});

				it( 'all caps words', function(){
					expect( SUT.abbreviate( phrase='PHP: Hypertext Preprocessor' ) ).toBe( 'PHP' );
				});

				it( 'non-acronym all caps word', function(){
					expect( SUT.abbreviate( phrase='GNU Image Manipulation Program' ) ).toBe( 'GIMP' );
				});

				it( 'hyphenated', function(){
					expect( SUT.abbreviate( phrase='Complementary metal-oxide semiconductor' ) ).toBe( 'CMOS' );
				});

			});

		});
		
	}
 
}

Version data entries

72 entries across 71 versions & 1 rubygems

Version Path
trackler-2.2.1.44 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.43 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.42 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.41 tracks/coldfusion/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.41 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.40 tracks/coldfusion/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.39 tracks/coldfusion/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.38 tracks/coldfusion/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.37 tracks/coldfusion/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.36 tracks/coldfusion/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.35 tracks/coldfusion/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.34 tracks/coldfusion/exercises/acronym/AcronymTest.cfc