Sha256: 7c3958bd58aca68503eb43a93c7a02335077ea7f525bd2092e6c7f5cbac6cbbe

Contents?: true

Size: 381 Bytes

Versions: 3

Compression:

Stored size: 381 Bytes

Contents

require "spec_helper"

describe Time do
  describe ".time" do
    it do
      Time.stub_chain("now.to_f") { 1 }
      Time.time.should == 1
    end
  end
end

describe Numeric do
  describe "#time_humanize" do
    it do
      expect(36561906.time_humanize).to eq("1 years 2 months 3 days 4 hours 5 minutes")
      expect(0.time_humanize(true)).to eq("0 seconds")
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tagen-2.0.2 spec/tagen/core/time_spec.rb
tagen-2.0.1 spec/tagen/core/time_spec.rb
tagen-2.0.0 spec/tagen/core/time_spec.rb