-
Notifications
You must be signed in to change notification settings - Fork 52
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
infer_spec_type_from_file_location!
wrongly set in project not using rspec-rails
#88
Comments
It's because you passed both Transpec checks if rspec-rails is loaded in your specs with dynamic analysis, so if dynamic analysis is skipped, it aggressively considers that the project is using rspec-rails. However in most cases this behavior won't be problematic since Transpec adds explicit spec type metadata only to spec files in the typical rspec-rails directory structure (e.g. Note that some conversion options other than That said, I'm thinking about adding By the way, basically the use of |
Makes sense. I (wrongly) thought that the dynamic analysis wasn't going to be involved in the updates I wanted transpec to apply. It might be worth emphasing how important the dynamic analysis bit is in the README. (Or maybe it already is emphasized but I haven't read your README recently...) |
I used the latest transpec against rspec-mocks as a way to convert to the
RSpec.describe
form (see rspec/rspec-mocks#768), and I found that transpec wrongly generatedconfig.infer_spec_type_from_file_location!
even though rspec-rails isn't loaded and therefore that method isn't available.The text was updated successfully, but these errors were encountered: