Skip to content

Commit bfa4480

Browse files
committed
Ensure CI files are valid YAML
Doesn't tell us they are fully valid, but should catch basic mistakes.
1 parent bdaab70 commit bfa4480

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

railties/test/generators/app_generator_test.rb

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -655,8 +655,16 @@ def test_both_brakeman_and_rubocop_binstubs_are_skipped_if_required
655655

656656
def test_inclusion_of_ci_files
657657
run_generator
658-
assert_file ".github/workflows/ci.yml"
659-
assert_file ".github/dependabot.yml"
658+
assert_file ".github/workflows/ci.yml" do |yaml|
659+
assert_nothing_raised do
660+
YAML.load(yaml)
661+
end
662+
end
663+
assert_file ".github/dependabot.yml" do |yaml|
664+
assert_nothing_raised do
665+
YAML.load(yaml)
666+
end
667+
end
660668
end
661669

662670
def test_ci_files_are_skipped_if_required

0 commit comments

Comments
 (0)