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.104 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.103 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.102 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.101 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.100 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.99 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.98 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.97 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.96 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.95 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.94 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.93 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.92 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.91 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.90 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.89 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.88 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.87 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.86 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.85 tracks/cfml/exercises/acronym/AcronymTest.cfc