Skip to content
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 generate request spec name has / #2057

Merged
merged 3 commits into from
Dec 26, 2018

Conversation

koheisg
Copy link
Contributor

@koheisg koheisg commented Dec 26, 2018

before

$ rails g rspec:request api/posts
Running via Spring preloader in process 2817
      create  spec/requests/api/api_posts_spec.rb
$ cat spec/requests/api/api_posts_spec.rb
require 'rails_helper'

RSpec.describe "Api::Posts", type: :request do
  describe "GET /api_posts" do
    it "works! (now write some real specs)" do
      get api_posts_index_path
      expect(response).to have_http_status(200)
    end
  end
end

after

$ rails g rspec:request api/posts
Running via Spring preloader in process 36682
      create  spec/requests/api/posts_spec.rb
$ cat spec/requests/api/posts_spec.rb
require 'rails_helper'

RSpec.describe "Api::Posts", type: :request do
  describe "GET /api/posts" do
    it "works! (now write some real specs)" do
      get api_posts_index_path
      expect(response).to have_http_status(200)
    end
  end
end

@koheisg koheisg force-pushed the fix-generate-request-spec-name branch from 3fe7bfc to 74e1ff8 Compare December 26, 2018 10:42
@koheisg koheisg force-pushed the fix-generate-request-spec-name branch from 74e1ff8 to 4f3e3a9 Compare December 26, 2018 11:56
@JonRowe JonRowe merged commit f71d9d7 into rspec:master Dec 26, 2018
@JonRowe
Copy link
Member

JonRowe commented Dec 26, 2018

Thank you! ❤️

JonRowe added a commit that referenced this pull request Dec 26, 2018
JonRowe pushed a commit that referenced this pull request Dec 26, 2018
Use `name.underscore.pluralize` instead of file and table name to handle the case where generating request specs for name spaced files
JonRowe added a commit that referenced this pull request Dec 26, 2018
@koheisg koheisg deleted the fix-generate-request-spec-name branch December 26, 2018 14:08
Copy link
Member

@benoittgt benoittgt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

sebjacobs pushed a commit to futurelearn/rspec-rails that referenced this pull request Mar 15, 2019
Use `name.underscore.pluralize` instead of file and table name to handle the case where generating request specs for name spaced files
sebjacobs pushed a commit to futurelearn/rspec-rails that referenced this pull request Mar 15, 2019
benoittgt pushed a commit to benoittgt/rspec-rails that referenced this pull request May 1, 2019
Use `name.underscore.pluralize` instead of file and table name to handle the case where generating request specs for name spaced files
benoittgt pushed a commit to benoittgt/rspec-rails that referenced this pull request May 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants