', result
@@ -1468,7 +1468,7 @@ class ApplicationHelperTest < Redmine::HelperTest
'Child page 1' +
''
@project = Project.find(1)
- assert textilizable(raw).gsub("\n", "").include?(expected)
+ assert textilizable(raw).delete("\n").include?(expected)
end
def test_toc_with_textile_formatting_should_be_parsed
@@ -1519,7 +1519,7 @@ class ApplicationHelperTest < Redmine::HelperTest
:edit_section_links =>
{:controller => 'wiki', :action => 'edit',
:project_id => '1', :id => 'Test'}
- ).gsub("\n", "")
+ ).delete("\n")
# heading that contains inline code
assert_match(
Regexp.new('' +
diff --git a/test/integration/repositories_git_test.rb b/test/integration/repositories_git_test.rb
index c6761004d..5c54d1e2f 100644
--- a/test/integration/repositories_git_test.rb
+++ b/test/integration/repositories_git_test.rb
@@ -24,7 +24,7 @@ class RepositoriesGitTest < Redmine::IntegrationTest
:repositories, :enabled_modules
REPOSITORY_PATH = Rails.root.join('tmp/test/git_repository').to_s
- REPOSITORY_PATH.gsub!(/\//, "\\") if Redmine::Platform.mswin?
+ REPOSITORY_PATH.tr!('/', "\\") if Redmine::Platform.mswin?
PRJ_ID = 3
NUM_REV = 28
diff --git a/test/unit/lib/redmine/scm/adapters/bazaar_adapter_test.rb b/test/unit/lib/redmine/scm/adapters/bazaar_adapter_test.rb
index 201a0e4e2..239e5ce30 100644
--- a/test/unit/lib/redmine/scm/adapters/bazaar_adapter_test.rb
+++ b/test/unit/lib/redmine/scm/adapters/bazaar_adapter_test.rb
@@ -21,7 +21,7 @@ require File.expand_path('../../../../../../test_helper', __FILE__)
class BazaarAdapterTest < ActiveSupport::TestCase
REPOSITORY_PATH = Rails.root.join('tmp/test/bazaar_repository').to_s
- REPOSITORY_PATH.gsub!(/\/+/, '/')
+ REPOSITORY_PATH.squeeze!('/')
if File.directory?(REPOSITORY_PATH)
def setup
diff --git a/test/unit/lib/redmine/scm/adapters/cvs_adapter_test.rb b/test/unit/lib/redmine/scm/adapters/cvs_adapter_test.rb
index 0c679d6d2..f0ceca300 100644
--- a/test/unit/lib/redmine/scm/adapters/cvs_adapter_test.rb
+++ b/test/unit/lib/redmine/scm/adapters/cvs_adapter_test.rb
@@ -21,7 +21,7 @@ require File.expand_path('../../../../../../test_helper', __FILE__)
class CvsAdapterTest < ActiveSupport::TestCase
REPOSITORY_PATH = Rails.root.join('tmp/test/cvs_repository').to_s
- REPOSITORY_PATH.gsub!(/\//, "\\") if Redmine::Platform.mswin?
+ REPOSITORY_PATH.tr!('/', "\\") if Redmine::Platform.mswin?
MODULE_NAME = 'test'
if File.directory?(REPOSITORY_PATH)
diff --git a/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb b/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb
index e0f506bfd..2c0b949c3 100644
--- a/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb
+++ b/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb
@@ -85,7 +85,7 @@ class MercurialAdapterTest < ActiveSupport::TestCase
[REPOSITORY_PATH, REPOSITORY_PATH + "/",
REPOSITORY_PATH + "//"].each do |repo|
adp = Redmine::Scm::Adapters::MercurialAdapter.new(repo)
- repo_path = adp.info.root_url.gsub(/\\/, "/")
+ repo_path = adp.info.root_url.tr('\\', "/")
assert_equal REPOSITORY_PATH, repo_path
assert_equal '39', adp.info.lastrev.revision
assert_equal '04aed9840e9266e535f5f20f7e42c9f9f84f9cf4', adp.info.lastrev.scmid
diff --git a/test/unit/repository_cvs_test.rb b/test/unit/repository_cvs_test.rb
index c3c592e68..2eafa8395 100644
--- a/test/unit/repository_cvs_test.rb
+++ b/test/unit/repository_cvs_test.rb
@@ -25,7 +25,7 @@ class RepositoryCvsTest < ActiveSupport::TestCase
include Redmine::I18n
REPOSITORY_PATH = repository_path('cvs')
- REPOSITORY_PATH.gsub!(/\//, "\\") if Redmine::Platform.mswin?
+ REPOSITORY_PATH.tr!('/', "\\") if Redmine::Platform.mswin?
# CVS module
MODULE_NAME = 'test'
CHANGESETS_NUM = 7
diff --git a/test/unit/repository_git_test.rb b/test/unit/repository_git_test.rb
index 1a2c51ea8..23557c067 100644
--- a/test/unit/repository_git_test.rb
+++ b/test/unit/repository_git_test.rb
@@ -25,10 +25,10 @@ class RepositoryGitTest < ActiveSupport::TestCase
include Redmine::I18n
REPOSITORY_PATH = Rails.root.join('tmp/test/git_repository').to_s
- REPOSITORY_PATH.gsub!(/\//, "\\") if Redmine::Platform.mswin?
+ REPOSITORY_PATH.tr!('/', "\\") if Redmine::Platform.mswin?
REPOSITORY_UTF8_PATH = Rails.root.join('tmp/test/git_utf8_repository').to_s
- REPOSITORY_UTF8_PATH.gsub!(/\//, "\\") if Redmine::Platform.mswin?
+ REPOSITORY_UTF8_PATH.tr!('/', "\\") if Redmine::Platform.mswin?
NUM_REV = 28
NUM_HEAD = 8