Skip to content

Commit

Permalink
Use name.underscore.pluralize
Browse files Browse the repository at this point in the history
  • Loading branch information
koheisg committed Dec 26, 2018
1 parent 0d2f4e2 commit 4f3e3a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/generators/rspec/integration/integration_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def generate_request_spec
return unless options[:request_specs]

template 'request_spec.rb',
File.join('spec/requests', class_path, "#{table_name}_spec.rb")
File.join('spec/requests', "#{name.underscore.pluralize}_spec.rb")
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/generators/rspec/integration/templates/request_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'rails_helper'

RSpec.describe "<%= class_name.pluralize %>", <%= type_metatag(:request) %> do
describe "GET /<%= table_name %>" do
describe "GET /<%= name.underscore.pluralize %>" do
it "works! (now write some real specs)" do
get <%= index_helper %>_path
expect(response).to have_http_status(200)
Expand Down

0 comments on commit 4f3e3a9

Please sign in to comment.