summaryrefslogtreecommitdiff
path: root/spec/lib
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2018-04-02 14:25:35 +0000
committerDouwe Maan <douwe@gitlab.com>2018-04-02 14:25:35 +0000
commit1c40f18f0260c2d8048270481d8671486313d162 (patch)
treeb1163e2b97abf5122ef0a0a71c3c49a934f86c87 /spec/lib
parentaec23eaa45f6740883e93f525e0a8896dfd93834 (diff)
parent6fd1d07cfc5244e518e3ee94bf6b796cfe38c3b0 (diff)
downloadgitlab-ce-1c40f18f0260c2d8048270481d8671486313d162.tar.gz
Merge branch 'sh-cleanup-crlf-gitmodules' into 'master'
Handle CR-LFs properly in .gitmodules file Closes #2262 See merge request gitlab-org/gitlab-ce!18117
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/gitlab/git/gitmodules_parser_spec.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/lib/gitlab/git/gitmodules_parser_spec.rb b/spec/lib/gitlab/git/gitmodules_parser_spec.rb
index 143aa2218c9..6fd2b33486b 100644
--- a/spec/lib/gitlab/git/gitmodules_parser_spec.rb
+++ b/spec/lib/gitlab/git/gitmodules_parser_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe Gitlab::Git::GitmodulesParser do
it 'should parse a .gitmodules file correctly' do
- parser = described_class.new(<<-'GITMODULES'.strip_heredoc)
+ data = <<~GITMODULES
[submodule "vendor/libgit2"]
path = vendor/libgit2
[submodule "vendor/libgit2"]
@@ -16,6 +16,7 @@ describe Gitlab::Git::GitmodulesParser do
url = https://example.com/another/project
GITMODULES
+ parser = described_class.new(data.gsub("\n", "\r\n"))
modules = parser.parse
expect(modules).to eq({