aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/time_with_zone_test.rb
diff options
context:
space:
mode:
authorPablo Herrero <pablodherrero@gmail.com>2014-10-18 04:47:40 -0300
committerPablo Herrero <pablodherrero@gmail.com>2014-10-27 21:43:12 -0300
commit1897d3a5d240a962dc89d2cab1d36bedb08974f7 (patch)
tree9a96219e7ae59539b9dd4f6b20aeaaa34b84c1c4 /activesupport/test/core_ext/time_with_zone_test.rb
parentd616fec8117ac25753ee23e15ac14261d298ee51 (diff)
downloadrails-1897d3a5d240a962dc89d2cab1d36bedb08974f7.tar.gz
rails-1897d3a5d240a962dc89d2cab1d36bedb08974f7.tar.bz2
rails-1897d3a5d240a962dc89d2cab1d36bedb08974f7.zip
Optimize TimeWithZoneTest#strftime
Diffstat (limited to 'activesupport/test/core_ext/time_with_zone_test.rb')
-rw-r--r--activesupport/test/core_ext/time_with_zone_test.rb5
1 files changed, 5 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 3000da8da4..ad4062e5fe 100644
--- a/activesupport/test/core_ext/time_with_zone_test.rb
+++ b/activesupport/test/core_ext/time_with_zone_test.rb
@@ -79,6 +79,11 @@ class TimeWithZoneTest < ActiveSupport::TestCase
assert_equal '1999-12-31 19:00:00 EST -0500', @twz.strftime('%Y-%m-%d %H:%M:%S %Z %z')
end
+ def test_strftime_with_escaping
+ assert_equal '%Z %z', @twz.strftime('%%Z %%z')
+ assert_equal '%EST %-0500', @twz.strftime('%%%Z %%%z')
+ end
+
def test_inspect
assert_equal 'Fri, 31 Dec 1999 19:00:00 EST -05:00', @twz.inspect
end