Sha256: d73ca4d2ade0a4c7b5afc98f311b34d17b56bfae4cd27ada93bedcfaacc4241b
Contents?: true
Size: 814 Bytes
Versions: 1
Compression:
Stored size: 814 Bytes
Contents
require 'test_helper' class TimeExtTest < Test::Unit::TestCase def test_to_msgpack_renders_as_string str = File.open(File.join(File.dirname(__FILE__), "msgpack_assertion_files", "time.mpac")).read assert_equal str, "January 4, 2011 2:34:17 PM".to_time.utc.to_msgpack end end class DateTimeExtTest < Test::Unit::TestCase def test_to_msgpack_renders_as_string str = File.open(File.join(File.dirname(__FILE__), "msgpack_assertion_files", "datetime.mpac")).read assert_equal str, "February 3 2010 4:15:09 AM".to_datetime.utc.to_msgpack end end class DateExtTest < Test::Unit::TestCase def test_to_msgpack_renders_as_string str = File.open(File.join(File.dirname(__FILE__), "msgpack_assertion_files", "date.mpac")).read assert_equal str, "March 23 2011".to_date.to_msgpack end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
msgpack-rails-0.0.1 | test/core_ext_test.rb |