Skip to content

Commit 0a57cbd

Browse files
committed
Fix test errors due to array being in different order
1 parent 30d46fb commit 0a57cbd

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

spec/create_github_release/command_line/options_spec.rb

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,10 @@
277277
before { options.pre = true }
278278

279279
it 'is expected NOT to be valid' do
280-
expect(subject).to have_attributes(valid?: false, errors: [/^--pre can only /, /^--pre-type can only /])
280+
expect(subject).to have_attributes(
281+
valid?: false,
282+
errors: match_array([/^--pre can only /, /^--pre-type can only /])
283+
)
281284
end
282285
end
283286

@@ -297,15 +300,20 @@
297300
before { options.pre = true }
298301

299302
it 'is expected NOT to be valid' do
300-
expect(subject).to have_attributes(valid?: false, errors: [/^--pre can only /, /^--pre-type can only /])
303+
expect(subject).to have_attributes(
304+
valid?: false,
305+
errors: match_array([/^--pre can only /, /^--pre-type can only /])
306+
)
301307
end
302308
end
303309

304310
context 'when pre is false' do
305311
before { options.pre = false }
306312

307313
it 'is expected NOT to be valid' do
308-
expect(subject).to have_attributes(valid?: false, errors: [/^--pre-type can only /])
314+
expect(subject).to have_attributes(
315+
valid?: false, errors: [/^--pre-type can only /]
316+
)
309317
end
310318
end
311319
end

0 commit comments

Comments
 (0)