Sha256: f3d25e51f527abe6e18c7dd9bd1a45b83b3ec5860156799f09622278bdae0a28
Contents?: true
Size: 668 Bytes
Versions: 3
Compression:
Stored size: 668 Bytes
Contents
require 'mida/datatype' describe Mida::DataType::ISO8601Date do it '#extract should raise an exception if some other text' do test = lambda {Mida::DataType::ISO8601Date.extract('27th Aug 2009')} test.should raise_error(ArgumentError) end it '#extract should raise an exception if value is empty' do test = lambda {Mida::DataType::ISO8601Date.extract('')} test.should raise_error(ArgumentError) end it '#extract? should return the input value' do date = "2009-08-27T01:13:04+05:10" Mida::DataType::ISO8601Date.extract(date).should == DateTime.parse(date) Mida::DataType::ISO8601Date.extract(date).to_s.should == date end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
mida-0.3.2 | spec/datatype/iso8601date_spec.rb |
mida-0.3.1 | spec/datatype/iso8601date_spec.rb |
mida-0.3.0 | spec/datatype/iso8601date_spec.rb |