-
Notifications
You must be signed in to change notification settings - Fork 33
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
Record deprecations outside of rspec/minitest #102
Comments
You would need something like this for the setup: deprecation_toolkit/lib/minitest/deprecation_toolkit_plugin.rb Lines 18 to 22 in 49818d4
and something like this to write the deprecations to the files:
The issue is that But you might just be able to pass another object, but that object should pass a few requirements:
deprecation_toolkit/lib/deprecation_toolkit/behaviors/record.rb Lines 10 to 12 in 49818d4
I feel like it could be interesting to be able to use on a controller (and have the controller name as the path, and the action as the "test name", i.e. the key in the recorded deprecations YAML), or a job (for jobs the test name makes less sense, it might just be By providing a Proc for deprecation_path you should be able to handle those there.
If you manage to get it to work, it could be an interesting feature, keeping the deprecation collection logic while changing the "unit of work" (right now it's only collecting for test/example, we could add collecting for job/controller and support development). But to be frank, the easiest way might be to write controller tests and use them to collect deprecations. This will also help you to make changes without breaking the app. |
For apps with less than 100% test coverage, is there any means of recording deprecations while running the app normally (i.e., in local development or a staging environment)? I've added the following early in the application's initialization, but this doesn't have the intended effect:
The text was updated successfully, but these errors were encountered: