Sha256: 0940c1c7801c7f36489159efcb459fc192d8dcd0c0cd6f7bd09e9cefa45b8b7c
Contents?: true
Size: 618 Bytes
Versions: 9
Compression:
Stored size: 618 Bytes
Contents
require 'spec_helper' describe Date, 'to_json' do it "should format the date in a way that i can use it for sorting in couchdb" do date = Date.parse('2009-01-01') date.to_json.should == "\"2009/01/01\"" end end describe Date, 'to_s(:json)' do it "should format it in the same way as to_json does so i can use this to do queries over date attributes" do date = Date.parse('2009-01-01') date.to_s(:json).should == "2009/01/01" end end describe Date, 'to_s' do it "should leave the original to_s untouched" do date = Date.parse('2009-01-01') date.to_s.should == "2009-01-01" end end
Version data entries
9 entries across 9 versions & 2 rubygems