Sha256: b1adfed15ff7a1cb48ea5fcc1fc31f8f7b5dad05fa6c1cde0730c712b4ca8f99
Contents?: true
Size: 622 Bytes
Versions: 3
Compression:
Stored size: 622 Bytes
Contents
require File.dirname(__FILE__) + '/test_helper' class SdbTimeTest < Test::Unit::TestCase include DeadSimpleDb should "cast a string to time" do time = SdbTime.new('2008-10-31 23:35:41') assert_equal Time.local(2008, 10, 31, 23, 35, 41), time.casted end should "be identical if provided a time" do time = SdbTime.new(Time.local(2008, 10, 31, 23, 35, 41)) assert_equal Time.local(2008, 10, 31, 23, 35, 41), time.casted end should "be formatted if printed as string" do time = SdbTime.new(Time.local(2008, 10, 31, 23, 35, 41)) assert_equal '2008-10-31 23:35:41', time.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_time_test.rb |
hungryblank-dead_simple_db-0.0.2 | test/sdb_time_test.rb |
hungryblank-dead_simple_db-0.0.3 | test/sdb_time_test.rb |