Sha256: 15fae0f25a53041551876bd93f8afe9722ce6e21395a12a91a74bee20b8068b5

Contents?: true

Size: 787 Bytes

Versions: 396

Compression:

Stored size: 787 Bytes

Contents

local acronym = require('acronym')

describe('acronym', function()
  it('should generate single-letter acronyms', function()
    assert.equal('L', acronym('Lua'))
  end)

  it('should generate multi-letter acronyms', function()
    assert.equal('LUA', acronym('Lua Ultimate Acronym'))
  end)

  it('should include lowercase words', function()
    assert.equal('ROR', acronym('Ruby on Rails'))
  end)

  it('should ignore punctuation', function()
    assert.equal('FIFO', acronym('First In, First Out'))
  end)

  it('should split words with internal capitalization', function()
    assert.equal('HTML', acronym('HyperText Markup Language'))
  end)

  it('should not split words that are all uppercase', function()
    assert.equal('PHP', acronym('PHP: Hypertext Processor'))
  end)
end)

Version data entries

396 entries across 396 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/lua/exercises/acronym/acronym_spec.lua
trackler-2.2.1.179 tracks/lua/exercises/acronym/acronym_spec.lua
trackler-2.2.1.178 tracks/lua/exercises/acronym/acronym_spec.lua
trackler-2.2.1.177 tracks/lua/exercises/acronym/acronym_spec.lua
trackler-2.2.1.176 tracks/lua/exercises/acronym/acronym_spec.lua
trackler-2.2.1.175 tracks/lua/exercises/acronym/acronym_spec.lua
trackler-2.2.1.174 tracks/lua/exercises/acronym/acronym_spec.lua
trackler-2.2.1.173 tracks/lua/exercises/acronym/acronym_spec.lua
trackler-2.2.1.172 tracks/lua/exercises/acronym/acronym_spec.lua
trackler-2.2.1.171 tracks/lua/exercises/acronym/acronym_spec.lua
trackler-2.2.1.170 tracks/lua/exercises/acronym/acronym_spec.lua
trackler-2.2.1.169 tracks/lua/exercises/acronym/acronym_spec.lua
trackler-2.2.1.167 tracks/lua/exercises/acronym/acronym_spec.lua
trackler-2.2.1.166 tracks/lua/exercises/acronym/acronym_spec.lua
trackler-2.2.1.165 tracks/lua/exercises/acronym/acronym_spec.lua
trackler-2.2.1.164 tracks/lua/exercises/acronym/acronym_spec.lua
trackler-2.2.1.163 tracks/lua/exercises/acronym/acronym_spec.lua
trackler-2.2.1.162 tracks/lua/exercises/acronym/acronym_spec.lua
trackler-2.2.1.161 tracks/lua/exercises/acronym/acronym_spec.lua
trackler-2.2.1.160 tracks/lua/exercises/acronym/acronym_spec.lua