diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-10-03 23:54:45 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-10-03 23:54:45 +0000 |
commit | d9dac76f53ab95776ffd10d997f4a7b6d41eed32 (patch) | |
tree | e1025c6bedb2f087f3bbb55a0d3e422a01e4ee53 /activesupport | |
parent | 748e6873c2c74eecd4985e0d2ff2bf4c3c95ea80 (diff) | |
download | rails-d9dac76f53ab95776ffd10d997f4a7b6d41eed32.tar.gz rails-d9dac76f53ab95776ffd10d997f4a7b6d41eed32.tar.bz2 rails-d9dac76f53ab95776ffd10d997f4a7b6d41eed32.zip |
Some platforms include colon in timezone offset, some don't. References #9744.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7733 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/test/core_ext/date_ext_test.rb | 6 | ||||
-rw-r--r-- | activesupport/test/core_ext/date_time_ext_test.rb | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/activesupport/test/core_ext/date_ext_test.rb b/activesupport/test/core_ext/date_ext_test.rb index 70f7cb0df7..7396c5c9a7 100644 --- a/activesupport/test/core_ext/date_ext_test.rb +++ b/activesupport/test/core_ext/date_ext_test.rb @@ -165,9 +165,9 @@ class DateExtCalculationsTest < Test::Unit::TestCase def test_xmlschema with_timezone 'US/Eastern' do - assert_equal '1880-06-28T00:00:00-04:00', Date.new(1880, 6, 28).xmlschema - assert_equal '1980-06-28T00:00:00-04:00', Date.new(1980, 6, 28).xmlschema - assert_equal '2080-06-28T00:00:00-04:00', Date.new(2080, 6, 28).xmlschema + assert_match(/^1880-06-28T00:00:00-04:?00$/, Date.new(1880, 6, 28).xmlschema) + assert_match(/^1980-06-28T00:00:00-04:?00$/, Date.new(1980, 6, 28).xmlschema) + assert_match(/^2080-06-28T00:00:00-04:?00$/, Date.new(2080, 6, 28).xmlschema) end end diff --git a/activesupport/test/core_ext/date_time_ext_test.rb b/activesupport/test/core_ext/date_time_ext_test.rb index 6984481a71..911bd7925e 100644 --- a/activesupport/test/core_ext/date_time_ext_test.rb +++ b/activesupport/test/core_ext/date_time_ext_test.rb @@ -186,9 +186,9 @@ class DateTimeExtCalculationsTest < Test::Unit::TestCase assert_equal '1880-02-28T15:15:10Z', DateTime.civil(1880, 2, 28, 15, 15, 10).xmlschema assert_equal '1980-02-28T15:15:10Z', DateTime.civil(1980, 2, 28, 15, 15, 10).xmlschema assert_equal '2080-02-28T15:15:10Z', DateTime.civil(2080, 2, 28, 15, 15, 10).xmlschema - assert_equal '1880-02-28T15:15:10-06:00', DateTime.civil(1880, 2, 28, 15, 15, 10, -0.25).xmlschema - assert_equal '1980-02-28T15:15:10-06:00', DateTime.civil(1980, 2, 28, 15, 15, 10, -0.25).xmlschema - assert_equal '2080-02-28T15:15:10-06:00', DateTime.civil(2080, 2, 28, 15, 15, 10, -0.25).xmlschema + assert_match(/^1880-02-28T15:15:10-06:?00$/, DateTime.civil(1880, 2, 28, 15, 15, 10, -0.25).xmlschema) + assert_match(/^1980-02-28T15:15:10-06:?00$/, DateTime.civil(1980, 2, 28, 15, 15, 10, -0.25).xmlschema) + assert_match(/^2080-02-28T15:15:10-06:?00$/, DateTime.civil(2080, 2, 28, 15, 15, 10, -0.25).xmlschema) end def test_acts_like_time |