]> source.dussan.org Git - redmine.git/commitdiff
code clean up test/functional/repositories_git_controller_test.rb
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 13 Sep 2019 05:00:43 +0000 (05:00 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 13 Sep 2019 05:00:43 +0000 (05:00 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@18463 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/functional/repositories_git_controller_test.rb

index c8a912cb6b57639b660a10dff3cc3c8962cc161d..d260015d31ab61e1552e77662b8fd12b396c158c 100644 (file)
@@ -32,7 +32,7 @@ class RepositoriesGitControllerTest < Redmine::RepositoryControllerTest
 
   def setup
     super
-    @ruby19_non_utf8_pass = Encoding.default_external.to_s != 'UTF-8'
+    @not_utf8_external = Encoding.default_external.to_s != 'UTF-8'
 
     User.current = nil
     @project    = Project.find(PRJ_ID)
@@ -247,8 +247,8 @@ class RepositoriesGitControllerTest < Redmine::RepositoryControllerTest
     end
 
     def test_entry_show_latin_1
-      if @ruby19_non_utf8_pass
-        puts_ruby19_non_utf8_pass
+      if @not_utf8_external
+        puts_pass_on_not_utf8
       elsif WINDOWS_PASS
         puts WINDOWS_SKIP_STR
       else
@@ -414,8 +414,8 @@ class RepositoriesGitControllerTest < Redmine::RepositoryControllerTest
     end
 
     def test_diff_latin_1
-      if @ruby19_non_utf8_pass
-        puts_ruby19_non_utf8_pass
+      if @not_utf8_external
+        puts_pass_on_not_utf8
       else
         with_settings :repositories_encodings => 'UTF-8,ISO-8859-1' do
           ['57ca437c', '57ca437c0acbbcb749821fdf3726a1367056d364'].each do |r1|
@@ -544,8 +544,8 @@ class RepositoriesGitControllerTest < Redmine::RepositoryControllerTest
     end
 
     def test_annotate_latin_1
-      if @ruby19_non_utf8_pass
-        puts_ruby19_non_utf8_pass
+      if @not_utf8_external
+        puts_pass_on_not_utf8
       elsif WINDOWS_PASS
         puts WINDOWS_SKIP_STR
       else
@@ -675,7 +675,7 @@ class RepositoriesGitControllerTest < Redmine::RepositoryControllerTest
 
     private
 
-    def puts_ruby19_non_utf8_pass
+    def puts_pass_on_not_utf8
       puts "TODO: This test fails " +
            "when Encoding.default_external is not UTF-8. " +
            "Current value is '#{Encoding.default_external.to_s}'"