Skip to content

Commit 8f1dea2

Browse files
committed
Add some content into the fixture for the Android update release notes test
1 parent cd42ef4 commit 8f1dea2

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

spec/android_update_release_notes_spec.rb

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
# Arrange
88
ENV['PROJECT_ROOT_FOLDER'] = tmp_dir
99
release_notes_txt = File.join(tmp_dir, 'RELEASE-NOTES.txt')
10-
File.write(release_notes_txt, '')
10+
File.write(release_notes_txt, FAKE_CONTENT)
1111

1212
# Act
1313
run_described_fastlane_action(
1414
new_version: '1.0'
1515
)
1616

1717
# Assert
18-
expect(File.read(release_notes_txt)).to eq("1.1\n-----\n\n\n")
18+
expect(File.read(release_notes_txt)).to eq(NEW_SECTION + FAKE_CONTENT)
1919
end
2020
end
2121

@@ -24,7 +24,7 @@
2424
# Arrange
2525
ENV['PROJECT_ROOT_FOLDER'] = tmp_dir
2626
changelog_md = File.join(tmp_dir, 'CHANGELOG.md')
27-
File.write(changelog_md, '')
27+
File.write(changelog_md, FAKE_CONTENT)
2828

2929
# Act
3030
run_described_fastlane_action(
@@ -33,8 +33,29 @@
3333
)
3434

3535
# Assert
36-
expect(File.read(changelog_md)).to eq("1.1\n-----\n\n\n")
36+
expect(File.read(changelog_md)).to eq(NEW_SECTION + FAKE_CONTENT)
3737
end
3838
end
3939
end
40+
41+
FAKE_CONTENT = <<~CONTENT
42+
1.0
43+
-----
44+
- Item 1 for v1.0
45+
- Item 2 for v1.0
46+
47+
// Comment in the middle
48+
49+
0.9.0
50+
-----
51+
- Item 1 for v0.9.0
52+
- Item 2 for v0.9.0
53+
CONTENT
54+
55+
NEW_SECTION = <<~CONTENT
56+
1.1
57+
-----
58+
59+
60+
CONTENT
4061
end

0 commit comments

Comments
 (0)