Sha256: c14b6ee617281ba76522354a6284be611bfc671d36903da7acf99bec3e92fae0

Contents?: true

Size: 536 Bytes

Versions: 12

Compression:

Stored size: 536 Bytes

Contents

require 'spec_helper'

describe CF::Date do
  describe('from_time') do
    it 'should create a cf date from a time' do
      CF::Date.from_time(Time.now).should be_a(CF::Date)
    end
  end

  describe('to_time') do
    it 'should return a time' do
      t = CF::Date.from_time(Time.now).to_time
      t.should be_a(Time)
      t.should be_within(0.01).of(Time.now)
    end
  end

  describe 'to_ruby' do
    it 'should behave like to_time' do
      t = CF::Date.from_time(Time.now).to_ruby
      t.should be_a(Time)
    end
  end
end

Version data entries

12 entries across 9 versions & 3 rubygems

Version Path
og-corefoundation-0.2.3 spec/date_spec.rb
og-corefoundation-0.2.2 spec/date_spec.rb
og-corefoundation-0.2.1 spec/date_spec.rb
yakg-0.0.8 vendor/gems/ruby/1.8/gems/corefoundation-0.2.0/spec/date_spec.rb
yakg-0.0.8 vendor/gems/ruby/1.9.1/gems/corefoundation-0.2.0/spec/date_spec.rb
yakg-0.0.8 vendor/gems/ruby/2.0.0/gems/corefoundation-0.2.0/spec/date_spec.rb
yakg-0.0.6 vendor/gems/ruby/1.8/gems/corefoundation-0.2.0/spec/date_spec.rb
yakg-0.0.6 vendor/gems/ruby/1.9.1/gems/corefoundation-0.2.0/spec/date_spec.rb
yakg-0.0.4 vendor/gems/ruby/1.8/gems/corefoundation-0.2.0/spec/date_spec.rb
yakg-0.0.3 vendor/gems/ruby/1.8/gems/corefoundation-0.2.0/spec/date_spec.rb
corefoundation-0.2.0 spec/date_spec.rb
corefoundation-0.1.4 spec/date_spec.rb