spec/parse_date_spec.rb in dm-parse-0.3.13 vs spec/parse_date_spec.rb in dm-parse-0.3.14
- old
+ new
@@ -14,9 +14,15 @@
context "when value is nil" do
let(:value) { nil }
it { should be_nil }
end
+
+ context "when value is Date" do
+ let(:value) { Date.parse "2011-08-21" }
+
+ it { should eq("__type" => "Date", "iso" => value.to_datetime.utc.iso8601(3)) }
+ end
end
describe "#load" do
subject { property.load value }
let(:value) { {"__type" => "Date", "iso" => datetime.utc.iso8601(3)} }