Sha256: 0647a4f86f5f919b8bc90763a239c1e1b13ca5028db329584cbb84fe64ba251d
Contents?: true
Size: 720 Bytes
Versions: 11
Compression:
Stored size: 720 Bytes
Contents
require 'helper' describe 'String extensions' do it 'should have #starts_with?' do '123456789'.starts_with?('12').should.equal true '123456789'.starts_with?('23').should.not.equal true end it 'should have #ends_with?' do '123456789'.ends_with?('89').should.equal true '123456789'.ends_with?('98').should.not.equal true end it 'should have #cleanpath' do '/'.cleanpath.should.equal '' '/a/b/c/../'.cleanpath.should.equal 'a/b' '/a/./b/../c/../d/./'.cleanpath.should.equal 'a/d' '1///2'.cleanpath.should.equal '1/2' end it 'should have #/' do (''/'').should.equal '' ('//a/b///'/'').should.equal 'a/b' ('a'/'x'/'..'/'b'/'c'/'.').should.equal 'a/b/c' end end
Version data entries
11 entries across 11 versions & 1 rubygems