I\'m using Rspec for testing. However, it uses my development DB instead of my test DB. How can this occur?
I simply use rspec to run my tests: don:my_project_root
I had this issue and felt that moving things from rails_helper.rb to spec_helper.rb wasn't addressing the core issue. Why was rspec loading spec_helper before and/or without rails_helper.rb?? Then it dawned on me to check .rspec and lo and behold it was improperly set to:
--require spec_helper
Change that to
--require rails_helper
and it might just fix your issue without having to move stuff from rails_helper to spec_helper.