-
-
Notifications
You must be signed in to change notification settings - Fork 1k
#1403 : string description for feature specs #1426
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
Conversation
Thanks for submitting this ❤️ Looks like the issue is with one of the rubocop's. I think simply changing |
@@ -8,8 +8,9 @@ class FeatureGenerator < Base | |||
|
|||
def generate_feature_spec | |||
return unless options[:feature_specs] | |||
file_name = table_name.split(" ").collect(&:downcase).join("_") |
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.
Since this is in a generator both Rails and Active Support have already been loaded. Perhaps change this to the following to provide a wider range of character conversion support:
file_name = table_name.parameterize.underscore
Thoughts?
@cupakromer Thanks for your suggestion. I have updated my PR with latest changes. Please check. |
Looking good so far. I double checked and I think I think what you want is simply However, thinking about this a little more this change would break existing functionality for generators that map to expected constants or routes. Here are some command samples with the file and spec name I would expect to get generated: $ bin/rails g rspec:feature Admin::WidgetsController
# spec/features/admin/widgets_controller_spec.rb
RSpec.feature "Admin::WidgetsController", type: :feature do
# ...
end
$ bin/rails g rspec:feature api/v1/widgets
# spec/features/api/v1/widgets_spec.rb
RSpec.feature "api/v1/widgets", type: :feature do
# ...
end
$ bin/rails g rspec:feature "Hello! This is my first RSpec::Rails feature"
# spec/features/hello_this_is_my_first_rspec_rails_feature_spec.rb
RSpec.feature "Hello! This is my first RSpec::Rails feature", type: :feature do
# ...
end |
@cupakromer I am thinking to modify
I am stuck to how to get it pass the remaining two scenarios. Could you help me? |
@cupakromer Could you please reply? |
😿 sorry I completely dropped the ball on this one. Closing in favor of #1503 |
#1403 string description for feature specs