Sha256: d90ce8ad1ff9da5aeb301c77376a0709934426a3b5ce32fcce4533eedc58a070
Contents?: true
Size: 504 Bytes
Versions: 1
Compression:
Stored size: 504 Bytes
Contents
require 'spec_helper' describe ::String do describe '.to_var' do it 'turns string into snake-cased symbol' do expect('This is a test string'.to_var).to be :this_is_a_test_string end end describe '.to_slug' do it 'slugifies a string' do expect('This is a test string'.to_slug).to match /this-is-a-test-string/ end it 'slugifies bad characters' do expect('This: #is a test string!'.to_slug).to match /this-colon-hash-is-a-test-string-bang/ end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
planter-cli-0.0.3 | spec/planter/string_spec.rb |