Sha256: aea33a244252a3a8b9eb86d466548d9ffca4f4c8d4e38b3b4976db7614e5aca2

Contents?: true

Size: 419 Bytes

Versions: 9

Compression:

Stored size: 419 Bytes

Contents

# encoding: utf-8
require 'fedux_org_stdlib/core_ext/string/characterize'

RSpec.describe String do
  context '#characterize' do
    it 'removes accents' 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
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
fedux_org-stdlib-0.10.9 spec/core_ext/string/characterize_spec.rb
fedux_org-stdlib-0.10.8 spec/core_ext/string/characterize_spec.rb
fedux_org-stdlib-0.10.7 spec/core_ext/string/characterize_spec.rb
fedux_org-stdlib-0.10.6 spec/core_ext/string/characterize_spec.rb
fedux_org-stdlib-0.10.5 spec/core_ext/string/characterize_spec.rb
fedux_org-stdlib-0.10.4 spec/core_ext/string/characterize_spec.rb
fedux_org-stdlib-0.10.3 spec/core_ext/string/characterize_spec.rb
fedux_org-stdlib-0.10.2 spec/core_ext/string/characterize_spec.rb
fedux_org-stdlib-0.10.1 spec/core_ext/string/characterize_spec.rb