Sha256: 1d88963aabeb093bc57633c52c43aada0dc592915f52ac064bc643475d22fb5c
Contents?: true
Size: 1.54 KB
Versions: 62
Compression:
Stored size: 1.54 KB
Contents
//= require workarea/core/modules/string (function () { 'use strict'; describe('WORKAREA.string', function () { describe('titleize', function () { it('titleizes a given string', function () { expect(WORKAREA.string.titleize('foo ')).to.equal('Foo'); expect(WORKAREA.string.titleize('BAR')).to.equal('Bar'); expect(WORKAREA.string.titleize('fOoBaR')).to.equal('Foobar'); }); }); describe('pluralize', function () { it('returns a custom pluralized string', function () { expect(WORKAREA.string.pluralize(2, 'baz', 'bazes')).to.equal('bazes'); }); it('returns a simple pluralized string', function () { expect(WORKAREA.string.pluralize(2, 'bar')).to.equal('bars'); }); it('returns an unpluralized string', function () { expect(WORKAREA.string.pluralize(1, 'foo')).to.equal('foo'); }); }); describe('dasherize', function () { it('converts to lowercase', function () { expect(WORKAREA.string.dasherize('FOO')).to.equal('foo'); }); it('replaces spaces with dashes', function () { expect(WORKAREA.string.dasherize('foo bar')).to.equal('foo-bar'); expect(WORKAREA.string.dasherize('foo bar')).to.equal('foo-bar'); expect(WORKAREA.string.dasherize('foo bar baz')).to.equal('foo-bar-baz'); }); }); }); }());
Version data entries
62 entries across 62 versions & 1 rubygems