From e580d565eb5526e0f432f88767d9d67b5b49c726 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Mon, 16 Mar 2015 04:55:45 +0000 Subject: [PATCH] 2.6-stable: fix unit test on Ruby 1.8.7 (#19305) git-svn-id: http://svn.redmine.org/redmine/branches/2.6-stable@14119 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/setting_test.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/unit/setting_test.rb b/test/unit/setting_test.rb index 6c3c27df9..b6e76c8e0 100644 --- a/test/unit/setting_test.rb +++ b/test/unit/setting_test.rb @@ -118,8 +118,9 @@ YAML Setting.commit_update_keywords = {} assert_equal 1, Setting.where(:name => 'commit_update_keywords').update_all(:value => yaml) Setting.clear_cache - - assert_equal 'UTF-8', Setting.commit_update_keywords.first['keywords'].encoding.name + if "".respond_to?(:force_encoding) + assert_equal 'UTF-8', Setting.commit_update_keywords.first['keywords'].encoding.name + end ensure Setting.where(:name => 'commit_update_keywords').delete_all Setting.clear_cache -- 2.39.5