Sha256: b4e99208b2b266fa8e599af0dc3360a3345dc5eb1ea3a9d8852a7a0d734c9df9
Contents?: true
Size: 564 Bytes
Versions: 2
Compression:
Stored size: 564 Bytes
Contents
require "spec_helper" describe Tabs::Resolutions::Year do let(:timestamp){ Time.utc(2000, 2) } context "#normalize" do it "should normalize the date to year, month" do expect(subject.normalize(timestamp)).to eq(timestamp.change(month: 1)) end end context "#serialize" do it "should return YYYY" do expect(subject.serialize(timestamp)).to eq("2000") end end context "#deserialize" do it "should convert string into date" do expect(subject.deserialize("2000")).to eq(timestamp.change(month: 1)) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tabs-1.0.1 | spec/lib/tabs/resolutions/year_spec.rb |
tabs-1.0.0 | spec/lib/tabs/resolutions/year_spec.rb |