Sha256: b8d2ae5fc6a33890825bb555ed40ddaa6e2339ddc580e4636850d84eb1d8d344
Contents?: true
Size: 631 Bytes
Versions: 8
Compression:
Stored size: 631 Bytes
Contents
require 'spec_helper' describe 'String#remove_suffix' do it 'removes a suffix in a string' do expect('Ladies Night'.remove_suffix(' Night')).to eq('Ladies') end it 'returns the original string if the parameter is not a suffix' do expect('Ladies Night'.remove_suffix('Ladies')).to eq('Ladies Night') end end describe 'String#remove_suffix!' do it 'removes a suffix in a string' do expect('Ladies Night'.remove_suffix!(' Night')).to eq('Ladies') end it 'returns the original string if the parameter is not a suffix' do expect('Ladies Night'.remove_suffix!('Ladies')).to eq('Ladies Night') end end
Version data entries
8 entries across 6 versions & 4 rubygems