-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Improve detection missing WhatIf support #2225
Conversation
From output of Whatif-run, do not replace line break by space, as this breaks the match if the break was done within a word.
@bheuvel Thanks! |
My first rspec unit test. Seems no problem, but two remarks/questions/opinions; Do you want a separate test for the WhatIf; one (as currently) without the "unfortunate" linebreak, and one with the linebreak? So test both explicitly. Or just enter the "unfortunate" linebreak in the current test, which will effectively, yet implicitly, test both. Second, due to pull #2190, the test_configuration will allways return a warning, and not an error. Having 5 minutes experience with this, it seems to me that this kinda invalidates some tests (at least that specific test line, used multiple times) using '.not_to raise_error', as it never will. So reliable testing different failure (all warning) scenario's doesn't seem reliable. Resolution for that would be to use:
is that a good idea? |
I don't generally like testing logging. I think a better way to do this would be to pull the regex out into its own function, similar to it 'should match whatif failure' do
lcm.send(:output_has_whatif_failure?, no_whatif_lcm_output).should be_true
end |
@jdmundrawala , @adamedx , sorry, due to personal stuff (am) out of the running. Won't be able to assist/contribute :( |
Thanks Bob. |
From output of Whatif-run, do not replace line break by space, as this breaks the match if the break was done within a word.