aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorErnie Miller <ernie@metautonomo.us>2008-06-28 22:27:32 -0400
committergbuesing <gbuesing@gmail.com>2008-06-29 13:37:07 -0500
commitd0092dc44d580f4179308c7394d9023098406f79 (patch)
treed5ec77bbd249cd8bb1c1ae0efd877f179c656494 /activesupport/test
parent029a7455846cde2654958358a6fe354f236ade35 (diff)
downloadrails-d0092dc44d580f4179308c7394d9023098406f79.tar.gz
rails-d0092dc44d580f4179308c7394d9023098406f79.tar.bz2
rails-d0092dc44d580f4179308c7394d9023098406f79.zip
Added support for regexp matching of priority zones in time_zone_select [#195 state:resolved]
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/time_zone_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/activesupport/test/time_zone_test.rb b/activesupport/test/time_zone_test.rb
index b42dcd17f8..515ffcf0bf 100644
--- a/activesupport/test/time_zone_test.rb
+++ b/activesupport/test/time_zone_test.rb
@@ -250,6 +250,13 @@ class TimeZoneTest < Test::Unit::TestCase
assert zone1 == zone1
end
+ def test_zone_match
+ zone = ActiveSupport::TimeZone['Eastern Time (US & Canada)']
+ assert zone =~ /Eastern/
+ assert zone =~ /New_York/
+ assert zone !~ /Nonexistent_Place/
+ end
+
def test_to_s
assert_equal "(GMT+03:00) Moscow", ActiveSupport::TimeZone['Moscow'].to_s
end