Sha256: 62829a0b49f1dca36240a464c6b95910dd92356ee20e8cc6ec685b1513ad80ac
Contents?: true
Size: 603 Bytes
Versions: 2
Compression:
Stored size: 603 Bytes
Contents
require "spec_helper" describe Tabs::Resolutions::Day do let(:timestamp){ Time.new(2000, 1, 1, 12, 15) } context "#normalize" do it "should normalize the date to year, month, day" do expect(subject.normalize(timestamp)).to eq(timestamp.utc.change(hour: 0)) end end context "#serialize" do it "should return YYYY-MM-DD" do expect(subject.serialize(timestamp)).to eq("2000-01-01") end end context "#deserialize" do it "should convert string into date" do expect(subject.deserialize("2000-01-01")).to eq(timestamp.utc.change(hour: 0)) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tabs-1.0.1 | spec/lib/tabs/resolutions/day_spec.rb |
tabs-1.0.0 | spec/lib/tabs/resolutions/day_spec.rb |