From 4e275075e653f97c0395e60580d3f23d2b1e7db4 Mon Sep 17 00:00:00 2001 From: Leo Gallucci Date: Wed, 6 Mar 2013 11:01:35 -0300 Subject: [PATCH] Fixed ruby 1.8.7 issue with dates too old --- CHANGELOG.md | 13 ++++++++++++- spec/time_ago_in_words_spec.rb | 4 ++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eca61d4..9eef798 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## [In git](https://github.com/elgalu/time_ago_in_words/compare/v0.0.1...HEAD) +## [In git](https://github.com/elgalu/time_ago_in_words/compare/v0.0.2...HEAD) ### New Features * n/a @@ -9,6 +9,17 @@ ### Chores * n/a +## [v0.0.2](https://github.com/elgalu/time_ago_in_words/tree/v0.0.2) + +### New Features +* n/a + +### Bugfixes +* Fixed ruby 1.8.7 issue with dates too old. (Leo Gallucci) + +### Chores +* Applied Extract Method refactor on Time#ago_in_words(). (Leo Gallucci) + ## [v0.0.1](https://github.com/elgalu/time_ago_in_words/tree/v0.0.1) ## First gem release diff --git a/spec/time_ago_in_words_spec.rb b/spec/time_ago_in_words_spec.rb index ee2574f..a8e5c36 100644 --- a/spec/time_ago_in_words_spec.rb +++ b/spec/time_ago_in_words_spec.rb @@ -16,11 +16,11 @@ it "returns empty string on future dates" do (Time.now + 1.6).ago_in_words.should == '' (Time.now + 100).ago_in_words.should == '' - (Time.now + 100_000).ago_in_words.should == '' + (Time.now + 9999).ago_in_words.should == '' end it "returns 'a very very long time ago' when more than 250 years ago" do - (Time.now - 60*60*24*100_001).ago_in_words.should == 'a very very long time ago' + Time.local(1700,01,01).ago_in_words.should == 'a very very long time ago' end it "can handle many days ago" do