Sha256: 494b15e39258acbdaafdff4a9c174a6e3d4368eba2834049fae11b03102ecee5

Contents?: true

Size: 705 Bytes

Versions: 1

Compression:

Stored size: 705 Bytes

Contents

require '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

1 entries across 1 versions & 1 rubygems

Version Path
friflaj_ri_cal-0.9.0 spec/ri_cal/property_value/text_spec.rb