Sha256: eaa1d25ba046873055aff677222995b93b240b6e9deb102614048f16ef6ce275

Contents?: true

Size: 375 Bytes

Versions: 34

Compression:

Stored size: 375 Bytes

Contents

require 'lib/ramaze/spec/helper/snippets'

describe "Numeric time extensions" do
  it 'should provide times in the past' do
    3.days.ago.to_i.should == (Time.now - 3*24*60*60).to_i
    2.months.ago.to_i.should == (Time.now - 2*30*24*60*60).to_i
  end

  it 'should provide times in the future' do
    2.weeks.from_now.to_i.should == (Time.now + 2*7*24*60*60).to_i
  end
end

Version data entries

34 entries across 34 versions & 5 rubygems

Version Path
Pistos-ramaze-2008.09 spec/snippets/numeric/time.rb
Pistos-ramaze-2008.12 spec/snippets/numeric/time.rb
Pistos-ramaze-2009.01 spec/snippets/numeric/time.rb
Pistos-ramaze-2009.02 spec/snippets/numeric/time.rb
Pistos-ramaze-2009.04.08 spec/snippets/numeric/time.rb
manveru-ramaze-2008.07 spec/snippets/numeric/time.rb
manveru-ramaze-2008.08 spec/snippets/numeric/time.rb
manveru-ramaze-2008.09 spec/snippets/numeric/time.rb
manveru-ramaze-2008.10 spec/snippets/numeric/time.rb
manveru-ramaze-2008.12 spec/snippets/numeric/time.rb
manveru-ramaze-2009.01 spec/snippets/numeric/time.rb
manveru-ramaze-2009.04.01 spec/snippets/numeric/time.rb
manveru-ramaze-2009.04.08 spec/snippets/numeric/time.rb
manveru-ramaze-2009.04.18 spec/snippets/numeric/time.rb
manveru-ramaze-2009.04.22 spec/snippets/numeric/time.rb
manveru-ramaze-2009.04 spec/snippets/numeric/time.rb
manveru-ramaze-2009.05.08 spec/snippets/numeric/time.rb
manveru-ramaze-2009.05 spec/snippets/numeric/time.rb
manveru-ramaze-2009.06.04 spec/snippets/numeric/time.rb
manveru-ramaze-2009.06.12 spec/snippets/numeric/time.rb