Sha256: 2d934e6889df729c4b59ae9dc46b4fed0ad7934a4bd4126b858bd9aa3aedebb5
Contents?: true
Size: 430 Bytes
Versions: 31
Compression:
Stored size: 430 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Paperclip::FilenameCleaner do it 'converts invalid characters to underscores' do cleaner = Paperclip::FilenameCleaner.new(/[aeiou]/) expect(cleaner.call("baseball")).to eq "b_s_b_ll" end it 'does not convert anything if the character regex is nil' do cleaner = Paperclip::FilenameCleaner.new(nil) expect(cleaner.call("baseball")).to eq "baseball" end end
Version data entries
31 entries across 29 versions & 6 rubygems