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.84 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.83 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.82 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.81 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.80 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.79 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.78 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.77 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.76 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.75 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.74 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.73 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.72 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.71 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.70 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.69 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.68 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.67 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.66 tracks/cfml/exercises/acronym/AcronymTest.cfc
trackler-2.2.1.65 tracks/cfml/exercises/acronym/AcronymTest.cfc