Sha256: cee9e033a046991542af5138c283e6fd93dcd95a98398f5287391795e00f06cb
Contents?: true
Size: 753 Bytes
Versions: 6
Compression:
Stored size: 753 Bytes
Contents
require 'mida_vocabulary/datatype' describe Mida::DataType::ISO8601Date do it '#parse should raise an exception if invalid date format' do test = lambda {Mida::DataType::ISO8601Date.parse('27th August 2009')} test.should raise_error(ArgumentError) end it '#parse should raise an exception if value is empty' do test = lambda {Mida::DataType::ISO8601Date.parse('')} test.should raise_error(ArgumentError) end context 'when passed a valid date' do before do @date_text = "2009-08-27T01:13:04+05:10" @date = Mida::DataType::ISO8601Date.parse(@date_text) end it '#to_s should return the date as an rfc822 text string' do @date.to_s.should == "Thu, 27 Aug 2009 01:13:04 +0510" end end end
Version data entries
6 entries across 6 versions & 1 rubygems