Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test for loading config without warnings #668

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

mjankowski
Copy link
Contributor

Background: #663 (comment)

This works in the sense that if I re-create that typo this test fails, and if I leave the typo fixed this passes, so it presumably would have caught that issue.

I'm not super-familiar with rubocop internals, and am very open to feedback here on more elegǎnt way to capture this. I was expecting to be able to either have a validation object with an activemodel-style errors array to assert against, and/or be able to just let this run and have the ValidationError be raised - but I think that's swallowed either somewhere within rubocop or somewhere in test harness.

@searls
Copy link
Contributor

searls commented Nov 19, 2024

Have you seen the test fail with an intentionally broken config? If so, then I'd say this is plenty elegant!

@mjankowski
Copy link
Contributor Author

Yeah - I re-created the previous EMABLED typo, messed around with various rubocop config objects until something failed (looked for validation/errors objects at first, settled on this), then confirmed it passed when corrected.

@searls
Copy link
Contributor

searls commented Nov 19, 2024

Nice! Then it certainly won't hurt. And if it somehow does we can always delete it

@searls searls merged commit 3c04f8c into standardrb:main Nov 19, 2024
4 checks passed
@mjankowski mjankowski deleted the test-for-warning-load branch November 19, 2024 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants