Sha256: 75d804be3cea6264e33cd66f3f2898625f3ba99d959e63fb37e67ae965c43d85

Contents?: true

Size: 305 Bytes

Versions: 1

Compression:

Stored size: 305 Bytes

Contents

require 'spec_helper'

describe DateTime do
  context "#to_i" do
    it "works" do
      DateTime.civil(2000).to_i.should == 946684800
    end
  end

  context "#to_f" do
    it "works" do
      DateTime.civil(1999,12,31,19,0,0,Rational(-5,24)).to_f.should == 946684800.0
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sc-core-ext-1.1.1 spec/sc-core-ext/date_time_spec.rb