From e1790efb85010c5e6f39eef029abf7b71ae3b9a6 Mon Sep 17 00:00:00 2001 From: Rick Olson Date: Sun, 23 Mar 2008 04:44:50 +0000 Subject: 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 --- activesupport/test/core_ext/time_with_zone_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'activesupport/test/core_ext') 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 -- cgit v1.2.3