Sha256: 9e726355804331a58032cc8da1947188ed835f31e97d6e60362c985f40520c8b

Contents?: true

Size: 839 Bytes

Versions: 52

Compression:

Stored size: 839 Bytes

Contents

#- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license

require File.join(File.dirname(__FILE__), %w[.. .. spec_helper])

describe RiCal::PropertyValue::Text do

  context ".ruby_value" do

    it "should handle escapes according to RFC2445 Sec 4.3.11 p 45" do
      expected = "this\\ has\, \nescaped\;\n\\x characters"
      it = RiCal::PropertyValue::Text.new(nil, :value => 'this\\ has\, \nescaped\;\N\x characters')
      it.ruby_value.should == expected
    end
  end

  context ".convert" do

    it "should handle escapes according to RFC2445 Sec 4.3.11 p 45" do
      expected = ':this has\, \nescaped\;\n characters\ncr\nnlcr\ncrnl'
      it = RiCal::PropertyValue::Text.convert(nil, "this\ has, \nescaped;\n characters\rcr\n\rnlcr\r\ncrnl")
      it.to_s.should == expected
    end
  end

end

Version data entries

52 entries across 52 versions & 8 rubygems

Version Path
demingfactor-ri_cal-0.10.0 spec/ri_cal/property_value/text_spec.rb
demingfactor-ri_cal-0.9.0 spec/ri_cal/property_value/text_spec.rb
ebeigarts-ri_cal-0.8.1 spec/ri_cal/property_value/text_spec.rb
rubyredrick-ri_cal-0.0.11 spec/ri_cal/property_value/text_spec.rb
rubyredrick-ri_cal-0.5.0 spec/ri_cal/property_value/text_spec.rb
rubyredrick-ri_cal-0.5.1 spec/ri_cal/property_value/text_spec.rb
rubyredrick-ri_cal-0.5.2 spec/ri_cal/property_value/text_spec.rb
rubyredrick-ri_cal-0.5.3 spec/ri_cal/property_value/text_spec.rb
rubyredrick-ri_cal-0.6.0 spec/ri_cal/property_value/text_spec.rb
rubyredrick-ri_cal-0.6.1 spec/ri_cal/property_value/text_spec.rb
rubyredrick-ri_cal-0.6.2 spec/ri_cal/property_value/text_spec.rb
rubyredrick-ri_cal-0.6.3 spec/ri_cal/property_value/text_spec.rb
rubyredrick-ri_cal-0.7.0 spec/ri_cal/property_value/text_spec.rb
rubyredrick-ri_cal-0.7.1 spec/ri_cal/property_value/text_spec.rb
rubyredrick-ri_cal-0.7.2 spec/ri_cal/property_value/text_spec.rb
rubyredrick-ri_cal-0.7.4 spec/ri_cal/property_value/text_spec.rb
rubyredrick-ri_cal-0.7.5 spec/ri_cal/property_value/text_spec.rb
rubyredrick-ri_cal-0.7.7 spec/ri_cal/property_value/text_spec.rb
rubyredrick-ri_cal-0.8.0 spec/ri_cal/property_value/text_spec.rb
rubyredrick-ri_cal-0.8.1 spec/ri_cal/property_value/text_spec.rb