Sha256: 84a2705d28ad4f556390aaef4cff8abca1447e88c5159ba7cedf7445251aa0ce
Contents?: true
Size: 1.04 KB
Versions: 1
Compression:
Stored size: 1.04 KB
Contents
# require 'spec_helper' # require 'wukong/encoding' # # describe "Wukong encoding" do # # it 'en/decodes to xml by default' do # Wukong.encode_str("&" ).should == '&' # Wukong.decode_str("&" ).should == '&' # end # it 'en/decodes to xml with :xml' do # Wukong.encode_str("&", :xml ).should == '&' # Wukong.decode_str("&", :xml ).should == '&' # end # it 'url en/decodes with :url' do # Wukong.encode_str("&", :url ).should == '%26' # Wukong.decode_str("%26", :url ).should == '&' # end # { "'" => "'", "\t" => "	", "\n" => " ", nil => '',}.each do |raw, enc| # it 'encodes #{raw} to #{enc}' do # Wukong.encode_str(raw, :xml ).should == enc # end # it 'decodes #{enc} to #{raw}' do # Wukong.decode_str(enc, :xml ).should == raw.to_s # end # end # ["normal_string with %punctuation should `not be molested", ""].each do |str| # it 'doesn\'t change #{str}' do # Wukong.encode_str(str, :xml ).should == str # end # end # # end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
wukong-3.0.0.pre | spec/away/encoding_spec.rb |