Sha256: 627b1ab511fe7136158aa33066304480f1f81a0748d8c1733975db4b25aca592
Contents?: true
Size: 542 Bytes
Versions: 7
Compression:
Stored size: 542 Bytes
Contents
# encoding: utf-8 require 'fedux_org_stdlib/core_ext/string/characterize' RSpec.describe String do context '#characterize' do it 'removes accents and whitespace' do expect('á'.characterize).to eq 'a' end it 'removes umlauts' do expect('ä'.characterize).to eq 'a' end it 'removes special characters "§$%&/()=?!\t' do expect(%('°^!"§$%&/()=?!\t).characterize).to eq '' end it 'removes whitespace' do expect(%(Donald E. Knuth).characterize).to eq 'donald-e-knuth' end end end
Version data entries
7 entries across 7 versions & 1 rubygems