aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/duration_test.rb
diff options
context:
space:
mode:
authorAkira Matsuda <ronnie@dio.jp>2016-11-05 16:12:30 +0900
committerAkira Matsuda <ronnie@dio.jp>2016-11-05 16:19:17 +0900
commita3478f1685a507874c710c8461cbfd6be84d95c0 (patch)
treea13a35e2a1b425083ea4c634651721a78c0b677e /activesupport/test/core_ext/duration_test.rb
parent5e758de1a5c797cdf88c744623aa39252e20bea3 (diff)
downloadrails-a3478f1685a507874c710c8461cbfd6be84d95c0.tar.gz
rails-a3478f1685a507874c710c8461cbfd6be84d95c0.tar.bz2
rails-a3478f1685a507874c710c8461cbfd6be84d95c0.zip
Tweaking some test data due to sprintf behavior change in 2.4
2.3: sprintf('%0.1f', 5.55) #=> "5.5" 2.4: sprintf('%0.1f', 5.55) #=> "5.6" see: https://github.com/ruby/ruby/commit/6ed8c79ddb11ccfb580bb0a22b22cc1362250255 and https://github.com/ruby/ruby/commit/295f60b94d5ff6551fab7c55e18d1ffa6a4cf7e3
Diffstat (limited to 'activesupport/test/core_ext/duration_test.rb')
-rw-r--r--activesupport/test/core_ext/duration_test.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/activesupport/test/core_ext/duration_test.rb b/activesupport/test/core_ext/duration_test.rb
index c8e8b8a350..b7b4a9dd00 100644
--- a/activesupport/test/core_ext/duration_test.rb
+++ b/activesupport/test/core_ext/duration_test.rb
@@ -292,11 +292,11 @@ class DurationTest < ActiveSupport::TestCase
def test_iso8601_output_precision
expectations = [
- [nil, "P1Y1MT5.55S", 1.year + 1.month + (5.55).seconds ],
- [0, "P1Y1MT6S", 1.year + 1.month + (5.55).seconds ],
- [1, "P1Y1MT5.5S", 1.year + 1.month + (5.55).seconds ],
- [2, "P1Y1MT5.55S", 1.year + 1.month + (5.55).seconds ],
- [3, "P1Y1MT5.550S", 1.year + 1.month + (5.55).seconds ],
+ [nil, "P1Y1MT8.55S", 1.year + 1.month + (8.55).seconds ],
+ [0, "P1Y1MT9S", 1.year + 1.month + (8.55).seconds ],
+ [1, "P1Y1MT8.6S", 1.year + 1.month + (8.55).seconds ],
+ [2, "P1Y1MT8.55S", 1.year + 1.month + (8.55).seconds ],
+ [3, "P1Y1MT8.550S", 1.year + 1.month + (8.55).seconds ],
[nil, "PT1S", 1.second ],
[2, "PT1.00S", 1.second ],
[nil, "PT1.4S", (1.4).seconds ],