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

FactoryGirl: rspec--include-fg-syntax-methods-p #117

Closed
imtayadeway opened this issue Apr 8, 2015 · 2 comments
Closed

FactoryGirl: rspec--include-fg-syntax-methods-p #117

imtayadeway opened this issue Apr 8, 2015 · 2 comments

Comments

@imtayadeway
Copy link
Contributor

Just noticed that this checks the spec helper for FactoryGirl::Syntax::Methods. More recent versions of rspec-rails will create a spec_helper.rb and rails_helper.rb file, and the appropriate place for putting this include is in the latter. Should the rails helper also be checked (assuming of course that it's a rails project, and that the rails helper is there)?

@dgutov
Copy link
Collaborator

dgutov commented Apr 9, 2015

Sure, why not?

@imtayadeway
Copy link
Contributor Author

@dgutov great! I'll see if I can tackle this over the next few days.

imtayadeway added a commit to imtayadeway/rspec-mode that referenced this issue Apr 27, 2015
More recent versions of rspec-rails create/recommend creating both a
`rails_helper.rb` and `spec_helper.rb` file, with the intention of
putting rails-specific configuration in the former. Given that a rails
project is set up in this way, including the syntax methods for factory
girl would be expected to go into the rails helper.

This change looks in the rails helper if it exists first before
searching the spec helper for the inclusion of this module.

pezra#117
imtayadeway added a commit to imtayadeway/rspec-mode that referenced this issue Apr 29, 2015
More recent versions of rspec-rails create/recommend creating both a
`rails_helper.rb` and `spec_helper.rb` file, with the intention of
putting rails-specific configuration in the former. Given that a rails
project is set up in this way, including the syntax methods for factory
girl would be expected to go into the rails helper.

This change looks in the rails helper if it exists first before
searching the spec helper for the inclusion of this module.

pezra#117
@dgutov dgutov closed this as completed Apr 30, 2015
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

No branches or pull requests

2 participants