Sha256: 1d16bbbedda2edbe571d5b0ffba70fbc3975ba16854e5abc5dc94b727606e9dd
Contents?: true
Size: 751 Bytes
Versions: 18
Compression:
Stored size: 751 Bytes
Contents
require 'spec_helper' describe Frodo::Properties::DateTime do let(:subject) { Frodo::Properties::DateTime.new('DateTime', '2000-01-01T16:00:00.000') } let(:new_datetime) { DateTime.strptime('2004-05-01T14:32:00.000', '%Y-%m-%dT%H:%M:%S.%L') } it { expect(subject.type).to eq('Edm.DateTime') } it { expect(subject.value).to eq(DateTime.parse('2000-01-01T16:00:00.000')) } it { expect(subject.url_value).to eq("2000-01-01T16:00:00.000")} it { expect {subject.value = 'bad'}.to raise_error(ArgumentError) } it { expect(lambda { subject.value = '2004-05-01T14:32:00.000' subject.value }.call).to eq(new_datetime) } it { expect(lambda { subject.value = new_datetime subject.value }.call).to eq(new_datetime) } end
Version data entries
18 entries across 18 versions & 1 rubygems