Skip to content

Commit 6c4115b

Browse files
committed
Change the name of constants to avoid conflicts between tests
1 parent d1cd02c commit 6c4115b

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

spec/android_update_release_notes_spec.rb

Lines changed: 6 additions & 6 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, FAKE_CONTENT)
10+
File.write(release_notes_txt, ANDROID_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(NEW_SECTION + FAKE_CONTENT)
18+
expect(File.read(release_notes_txt)).to eq(ANDROID_NEW_SECTION + ANDROID_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, FAKE_CONTENT)
27+
File.write(changelog_md, ANDROID_FAKE_CONTENT)
2828

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

3535
# Assert
36-
expect(File.read(changelog_md)).to eq(NEW_SECTION + FAKE_CONTENT)
36+
expect(File.read(changelog_md)).to eq(ANDROID_NEW_SECTION + ANDROID_FAKE_CONTENT)
3737
end
3838
end
3939
end
4040
end
4141

42-
FAKE_CONTENT = <<~CONTENT.freeze
42+
ANDROID_FAKE_CONTENT = <<~CONTENT.freeze
4343
1.0
4444
-----
4545
- Item 1 for v1.0
@@ -53,7 +53,7 @@
5353
- Item 2 for v0.9.0
5454
CONTENT
5555

56-
NEW_SECTION = <<~CONTENT.freeze
56+
ANDROID_NEW_SECTION = <<~CONTENT.freeze
5757
1.1
5858
-----
5959

spec/ios_update_release_notes_spec.rb

Lines changed: 6 additions & 6 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, FAKE_CONTENT)
10+
File.write(release_notes_txt, IOS_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(NEW_SECTION + FAKE_CONTENT)
18+
expect(File.read(release_notes_txt)).to eq(IOS_NEW_SECTION + IOS_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, FAKE_CONTENT)
27+
File.write(changelog_md, IOS_FAKE_CONTENT)
2828

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

3535
# Assert
36-
expect(File.read(changelog_md)).to eq(NEW_SECTION + FAKE_CONTENT)
36+
expect(File.read(changelog_md)).to eq(IOS_NEW_SECTION + IOS_FAKE_CONTENT)
3737
end
3838
end
3939
end
4040
end
4141

42-
FAKE_CONTENT = <<~CONTENT.freeze
42+
IOS_FAKE_CONTENT = <<~CONTENT.freeze
4343
1.0
4444
-----
4545
- Item 1 for v1.0
@@ -53,7 +53,7 @@
5353
- Item 2 for v0.9.0
5454
CONTENT
5555

56-
NEW_SECTION = <<~CONTENT.freeze
56+
IOS_NEW_SECTION = <<~CONTENT.freeze
5757
1.1
5858
-----
5959

0 commit comments

Comments
 (0)