Sha256: 3fa59c79a6c591a4a873bb49d128bef6af8d2b5a3a5ff08cda4ee6a3ff135237

Contents?: true

Size: 290 Bytes

Versions: 2

Compression:

Stored size: 290 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

2 entries across 2 versions & 1 rubygems

Version Path
sc-core-ext-1.2.1 spec/sc-core-ext/date_time_spec.rb
sc-core-ext-1.2.0 spec/sc-core-ext/date_time_spec.rb