-
Notifications
You must be signed in to change notification settings - Fork 900
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
fix shared example path in provider generator spec_helper.rb template #15416
Conversation
@durandom @bdunne Thoughts? See the rationale in ManageIQ/manageiq-providers-ansible_tower#6 |
I'm wondering if the plugins should add Rails.root.join("spec/support") as well as Engine.root.join("spec/support") . |
Note that this removes Rails.root.join("spec/shared"), but what I'm questioning is if we need to include Rails.root.join("spec/support") |
The rationale behind this is explained in the README.md
So, long story short. |
731ad69
to
4a00f91
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 from me
@@ -10,3 +10,4 @@ | |||
# end | |||
|
|||
Dir[Rails.root.join("spec/shared/**/*.rb")].each { |f| require f } | |||
Dir[File.join(ManageIQ::Providers::<%= class_name %>::Engine.root, 'spec/support/**/*.rb')].each { |f| require f } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for consistency you could. but 🤷♂️
Dir[ManageIQ::Providers::<%= class_name %>::Engine.root.join("spec/support/**/*.rb")].each { |f| require f }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, consistency is good, done!
4a00f91
to
f13f75f
Compare
Checked commit jameswnl@f13f75f with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM
The generated
spec_helper
would include from the wrong path and so providers would not find the existing shared examples (as in this PR