diff options
author | Rick Olson <technoweenie@gmail.com> | 2008-03-23 04:44:50 +0000 |
---|---|---|
committer | Rick Olson <technoweenie@gmail.com> | 2008-03-23 04:44:50 +0000 |
commit | e1790efb85010c5e6f39eef029abf7b71ae3b9a6 (patch) | |
tree | a9600d7e8f83bcab5cbcbda25074a12c2095594d /activesupport/test | |
parent | 038139870825ad843b0683e5273dc4d11cb684b3 (diff) | |
download | rails-e1790efb85010c5e6f39eef029abf7b71ae3b9a6.tar.gz rails-e1790efb85010c5e6f39eef029abf7b71ae3b9a6.tar.bz2 rails-e1790efb85010c5e6f39eef029abf7b71ae3b9a6.zip |
Ensure that TimeWithZone#to_yaml works when passed a YAML::Emitter. [rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9081 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/core_ext/time_with_zone_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/time_with_zone_test.rb b/activesupport/test/core_ext/time_with_zone_test.rb index fc4f61dd37..70b3d90bd6 100644 --- a/activesupport/test/core_ext/time_with_zone_test.rb +++ b/activesupport/test/core_ext/time_with_zone_test.rb @@ -106,6 +106,12 @@ uses_tzinfo 'TimeWithZoneTest' do end end + def test_ruby_to_yaml + silence_warnings do + assert_equal "--- \n:twz: 2000-01-01 00:00:00 Z\n", {:twz => @twz}.to_yaml + end + end + def test_httpdate silence_warnings do # silence warnings raised by tzinfo gem assert_equal 'Sat, 01 Jan 2000 00:00:00 GMT', @twz.httpdate |