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.64 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.63 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.62 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.61 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.60 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.59 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.58 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.57 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.56 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.55 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.54 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.53 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.52 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.51 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.50 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.49 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.48 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.47 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.46 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.45 tracks/cfml/exercises/acronym/AcronymTest.cfc