Sha256: edc354eda4caba29bc0af93bc00c1ce49afdc1da9745b4bbe0b5589da04063db

Contents?: true

Size: 548 Bytes

Versions: 2

Compression:

Stored size: 548 Bytes

Contents

require 'active_support/all'
require './lib/reverse_chronic'

describe ReverseChronic do
  it "says now is 'today'" do
    ReverseChronic.humanize(Time.now).should == 'today'
  end

  it "says today is 'today'" do
    ReverseChronic.humanize(Date.today).should == 'today'
  end

  it "says yesterday 'yesterday'" do
    ReverseChronic.humanize(Time.now.yesterday).should == 'yesterday'
  end

  it "calls 2 or more days ago by name" do
    time = Time.parse('2012-02-05')
    ReverseChronic.humanize(time).should == 'Sunday, Feb 5, 2012'
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
reverse_chronic-0.0.1 spec/reverse_chronic_spec.rb
reverse_chronic-0.0.1.beta spec/reverse_chronic_spec.rb