summaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-11-08 15:14:38 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-11-08 15:14:38 +0000
commite019d9d6a11575a42b2342ba374ece8edaff1275 (patch)
tree910047a82bda80abcc2c29152ece29d59db5facd /test/unit
parentc56c9d3c19f8f9b4a50d5db8a3b22ebb6f81a831 (diff)
downloadredmine-e019d9d6a11575a42b2342ba374ece8edaff1275.tar.gz
redmine-e019d9d6a11575a42b2342ba374ece8edaff1275.zip
cleanup: rubocop: fix Layout/IndentHeredoc in Redmine::UnifiedDiffTest#test_previous_file_name_with_git
git-svn-id: http://svn.redmine.org/redmine/trunk@18970 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/lib/redmine/unified_diff_test.rb81
1 files changed, 40 insertions, 41 deletions
diff --git a/test/unit/lib/redmine/unified_diff_test.rb b/test/unit/lib/redmine/unified_diff_test.rb
index 94bdd4c63..df335de32 100644
--- a/test/unit/lib/redmine/unified_diff_test.rb
+++ b/test/unit/lib/redmine/unified_diff_test.rb
@@ -192,47 +192,46 @@ DIFF
end
def test_previous_file_name_with_git
- diff = Redmine::UnifiedDiff.new(<<-DIFF)
-From 585da9683fb5ed7bf7cb438492e3347cdf3d83df Mon Sep 17 00:00:00 2001
-From: Gregor Schmidt <schmidt@nach-vorne.eu>
-Date: Mon, 5 Mar 2018 14:12:13 +0100
-Subject: [PATCH] changes including a rename, rename+modify and addition
-
----
- one.markdown => one.md | 0
- three.md | 2 ++
- two.markdown => two.md | 1 +
- 3 files changed, 3 insertions(+)
- rename one.markdown => one.md (100%)
- create mode 100644 three.md
- rename two.markdown => two.md (50%)
-
-diff --git a/one.markdown b/one.md
-similarity index 100%
-rename from one.markdown
-rename to one.md
-diff --git a/three.md b/three.md
-new file mode 100644
-index 0000000..288012f
---- /dev/null
-+++ b/three.md
-@@ -0,0 +1,2 @@
-+three
-+=====
-diff --git a/two.markdown b/two.md
-similarity index 50%
-rename from two.markdown
-rename to two.md
-index f719efd..6a268ed 100644
---- a/two.markdown
-+++ b/two.md
-@@ -1 +1,2 @@
- two
-+===
---
-2.14.1
-DIFF
-
+ diff = Redmine::UnifiedDiff.new(<<~DIFF)
+ From 585da9683fb5ed7bf7cb438492e3347cdf3d83df Mon Sep 17 00:00:00 2001
+ From: Gregor Schmidt <schmidt@nach-vorne.eu>
+ Date: Mon, 5 Mar 2018 14:12:13 +0100
+ Subject: [PATCH] changes including a rename, rename+modify and addition
+
+ ---
+ one.markdown => one.md | 0
+ three.md | 2 ++
+ two.markdown => two.md | 1 +
+ 3 files changed, 3 insertions(+)
+ rename one.markdown => one.md (100%)
+ create mode 100644 three.md
+ rename two.markdown => two.md (50%)
+
+ diff --git a/one.markdown b/one.md
+ similarity index 100%
+ rename from one.markdown
+ rename to one.md
+ diff --git a/three.md b/three.md
+ new file mode 100644
+ index 0000000..288012f
+ --- /dev/null
+ +++ b/three.md
+ @@ -0,0 +1,2 @@
+ +three
+ +=====
+ diff --git a/two.markdown b/two.md
+ similarity index 50%
+ rename from two.markdown
+ rename to two.md
+ index f719efd..6a268ed 100644
+ --- a/two.markdown
+ +++ b/two.md
+ @@ -1 +1,2 @@
+ two
+ +===
+ --
+ 2.14.1
+ DIFF
assert_equal 2, diff.size
assert_equal "three.md", diff[0].file_name
assert_nil diff[0].previous_file_name