Sha256: 50b6468ca08a7469684bc7c2252ae163b49ff1e0ffc03a1ffc9a1412da7d283f

Contents?: true

Size: 516 Bytes

Versions: 21

Compression:

Stored size: 516 Bytes

Contents

require File.expand_path(File.join(File.dirname(__FILE__), 'spec_helper'))
require 'json'

describe DateTime, "#to_time" do
  before do
    @expected = Time.now.to_s
    @datetime = DateTime.parse(@expected)
  end

  it "should return a copy of time" do
    time = @datetime.to_time
    time.class.should == Time
    time.to_s.should == @expected
  end
end

describe Time, "#to_datetime" do
  it "should return a copy of its self" do
    datetime = DateTime.now
    datetime.to_datetime.should == datetime
  end
end

Version data entries

21 entries across 20 versions & 5 rubygems

Version Path
sundbp-extlib-0.9.14 spec/datetime_spec.rb
middleman-0.13.1 lib/middleman/vendor/gems/ruby/1.9.1/gems/extlib-0.9.14/spec/datetime_spec.rb
middleman-0.13.1 lib/middleman/vendor/gems/ruby/1.8/gems/extlib-0.9.14/spec/datetime_spec.rb
middleman-0.12.2 lib/middleman/vendor/gems/gems/extlib-0.9.14/spec/datetime_spec.rb
middleman-0.12.1 lib/middleman/vendor/gems/gems/extlib-0.9.14/spec/datetime_spec.rb
extlib-0.9.14 spec/datetime_spec.rb
ginst-2009.12.8 vendor/gems/extlib-0.9.13/spec/datetime_spec.rb
middleman-0.12.0.pre3 lib/middleman/vendor/gems/gems/extlib-0.9.13/spec/datetime_spec.rb
middleman-0.12.0.pre2 lib/middleman/vendor/gems/gems/extlib-0.9.13/spec/datetime_spec.rb
middleman-0.12.0.pre lib/middleman/vendor/gems/gems/extlib-0.9.13/spec/datetime_spec.rb
ginst-2009.11.24 vendor/gems/extlib-0.9.13/spec/datetime_spec.rb
ginst-2009.11.23 vendor/gems/extlib-0.9.13/spec/datetime_spec.rb
rango-0.0.6 vendor/extlib/spec/datetime_spec.rb
rango-0.1.pre vendor/extlib/spec/datetime_spec.rb
middleman-0.10.17 vendor/gems/gems/extlib-0.9.13/spec/datetime_spec.rb
middleman-0.10.16 vendor/gems/gems/extlib-0.9.13/spec/datetime_spec.rb
middleman-0.10.15 vendor/gems/gems/extlib-0.9.13/spec/datetime_spec.rb
middleman-0.10.14 vendor/gems/gems/extlib-0.9.13/spec/datetime_spec.rb
ginst-2.0.1 vendor/gems/extlib-0.9.13/spec/datetime_spec.rb
ginst-2.0.0 vendor/gems/extlib-0.9.13/spec/datetime_spec.rb