Skip to content

Commit 4121687

Browse files
committed
Add test for single string auto-conversion to array
1 parent d09c29d commit 4121687

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

spec/find_previous_tag_spec.rb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,22 @@ def stub_main_command(expected_command, stdout:, success: true)
9797
expect(tag).to eq('v1.7.3')
9898
end
9999

100+
it 'auto-converts a single exclude string into an array' do
101+
# Arrange
102+
stub_current_commit_tag(nil)
103+
stub_main_command(
104+
%w[git describe --tags --abbrev=0 --match v* --exclude *beta*],
105+
stdout: 'v1.7.3'
106+
)
107+
# Act — Fastlane's ConfigItem auto-converts a String to Array when type is Array
108+
tag = run_described_fastlane_action(
109+
pattern: 'v*',
110+
exclude: '*beta*'
111+
)
112+
# Assert
113+
expect(tag).to eq('v1.7.3')
114+
end
115+
100116
it 'excludes tags matching multiple exclude patterns' do
101117
# Arrange
102118
stub_current_commit_tag(nil)

0 commit comments

Comments
 (0)