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

Minitest / Shoulda Gem errors #23

Open
eliaszica opened this issue Jan 26, 2017 · 0 comments
Open

Minitest / Shoulda Gem errors #23

eliaszica opened this issue Jan 26, 2017 · 0 comments

Comments

@eliaszica
Copy link

eliaszica commented Jan 26, 2017

I'm having a issue similar to #15 in my Rails 5 application models tests with Minitest and Shoulda gem. So I inserted this code block (as issue #15's author suggests) in my "schema_associations.rb", and the tests now run smoothly:

if Rails.env.test?
   [Class1, Class2, Class3].each do |c|
      c.reflect_on_all_associations
   end
end

For now I'm happy with this solution, and maybe this scenario can help you to find some improvement to schema_associations gem (I hope so).

Thank you, this gem is awesome!

Elias

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

1 participant