Skip to content

Commit

Permalink
Merge cb0d06d into a35c141
Browse files Browse the repository at this point in the history
  • Loading branch information
rossta committed Mar 7, 2016
2 parents a35c141 + cb0d06d commit a503c88
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions spec/montrose/utils_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
describe Montrose::Utils do
include Montrose::Utils

it "return current_time" do
Time.freeze do
expect(current_time).to eq(Time.current)
end
end

describe "#parse_time" do
it { parse_time("Sept 1, 2015 12:00PM").must_equal Time.parse("Sept 1, 2015 12:00PM") }
it "uses Time.zone if available" do
Expand Down Expand Up @@ -104,4 +110,11 @@
it { days_in_month(11).must_equal 30 }
it { days_in_month(12).must_equal 31 }
end

describe "#days_in_year" do
it { days_in_year(2005).must_equal 365 }
it { days_in_year(2004).must_equal 366 }
it { days_in_year(2000).must_equal 366 }
it { days_in_year(1900).must_equal 365 }
end
end

0 comments on commit a503c88

Please sign in to comment.