Sha256: 4d02b9967a72bf4f8b6b70d98b3317a821dfba117390eb86c0f3cf6632cd7869
Contents?: true
Size: 576 Bytes
Versions: 9
Compression:
Stored size: 576 Bytes
Contents
# Don't run specs if HtmlSafeString is not present, eg when running in a rails environment if defined?(HtmlSafeString) describe HtmlSafeString do it 'should be html safe at creation' do HtmlSafeString.new.should be_html_safe end it 'should stay html safe after concatenation' do s = HtmlSafeString.new('alpha') s += 'beta' s.should == 'alphabeta' s.should be_html_safe end it 'should safely escape dangerous chars on concatenation' do s = HtmlSafeString.new('alpha') s += 'b&ta' s.should == 'alphab&ta' end end end
Version data entries
9 entries across 9 versions & 1 rubygems