Sha256: ad4cf0492f650d8c7268a99ff78b6210d2183e7d7bbd8439fa629d2cb1f3da8f
Contents?: true
Size: 548 Bytes
Versions: 3
Compression:
Stored size: 548 Bytes
Contents
require File.dirname(__FILE__) + '/test_helper' class SdbDateTest < Test::Unit::TestCase include DeadSimpleDb should "cast a string to date" do date = SdbDate.new('2008-10-31') assert_equal Date.new(2008, 10, 31), date.casted end should "be identical if provided a date" do date = SdbDate.new(Date.new(2008, 10, 31)) assert_equal Date.new(2008, 10, 31), date.casted end should "be formatted if printed as string" do date = SdbDate.new(Date.new(2008, 10, 31)) assert_equal '2008-10-31', date.to_s end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
hungryblank-dead_simple_db-0.0.1 | test/sdb_date_test.rb |
hungryblank-dead_simple_db-0.0.2 | test/sdb_date_test.rb |
hungryblank-dead_simple_db-0.0.3 | test/sdb_date_test.rb |