Sha256: 9ff6b451a3ad5727de5bb81971b1d6c7dd3f18e7879e3a9d349093fc02734204
Contents?: true
Size: 699 Bytes
Versions: 2
Compression:
Stored size: 699 Bytes
Contents
require "spec_helper" describe Tabs::Resolutions::Week do let(:timestamp){ Time.utc(2000, 1, 1) } let(:beginning_of_week_timestamp){ Time.utc(1999, 12, 27) } context "#normalize" do it "should roll to the beginning of the week" do expect(subject.normalize(timestamp)).to eq(beginning_of_week_timestamp) end end context "#serialize" do it "should return YYYY-MM-DD based on beginning of the week" do expect(subject.serialize(timestamp)).to eq("1999-12-27") end end context "#deserialize" do it "should convert beginning of week string into date" do expect(subject.deserialize("1999-12-27")).to eq(beginning_of_week_timestamp) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tabs-1.0.1 | spec/lib/tabs/resolutions/week_spec.rb |
tabs-1.0.0 | spec/lib/tabs/resolutions/week_spec.rb |