Skip to content

Fix fixtures path for model generator when using namespaced models #2077

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

Merged
merged 1 commit into from Feb 12, 2019
Merged

Fix fixtures path for model generator when using namespaced models #2077

merged 1 commit into from Feb 12, 2019

Conversation

ghost
Copy link

@ghost ghost commented Feb 10, 2019

When fixures are enabled the model generator create the fixture files with an incorrect path for namespaced models

application.rb configuration

config.generators do |g|
  g.test_framework :rspec, fixture: true
end

Running the generator for a namespaced model

bin/rails g model admin/posts

Expected

spec/fixtures/admin/posts.yml

Actual

spec/fixtures/admin_posts.yml

@benoittgt
Copy link
Member

benoittgt commented Feb 11, 2019

Hello @nxlith

This PR looks good to me. Fails on CI seem unrelated (maybe: rails/rails#35153, rails/rails#35154).
I will try to fix the CI if I find time.

@benoittgt
Copy link
Member

PR to fix the build. #2078

@benoittgt
Copy link
Member

Do you think you can pull rebase master?

@ghost
Copy link
Author

ghost commented Feb 12, 2019

Hi @benoittgt, rebase done

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 a lot @nxlith! 🎉

LGTM. Waiting for a second approval from @JonRowe or @samphippen :)

@JonRowe JonRowe merged commit 7c0186b into rspec:master Feb 12, 2019
JonRowe added a commit that referenced this pull request Feb 12, 2019
benoittgt pushed a commit to benoittgt/rspec-rails that referenced this pull request Feb 22, 2019
benoittgt pushed a commit that referenced this pull request Feb 22, 2019
benoittgt pushed a commit that referenced this pull request Feb 23, 2019
benoittgt pushed a commit to benoittgt/rspec-rails that referenced this pull request May 1, 2019
JonRowe added a commit that referenced this pull request Oct 3, 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.

2 participants