Can you please clarify, is there something in rspec-rails that prevents you from having a separate env? There's this https://github.com/rspec/rspec-rails/blob/13a8a01cc07c93db97b5f1cd57229527441cd626/lib/generators/rspec/install/templates/spec/rails_helper.rb#L3
ENV['RAILS_ENV'] ||= 'test' With `||=` you can override `RAILS_ENV` when running your tests in a different environment with `RAILS_ENV=integration rspec`. Or you can create an additional `spec/integration_helper.rb` that would have ENV['RAILS_ENV'] ||= 'integration' instead, and `require 'integration_helper'` from your specs that are intended to be run in that env. Just one word of precaution, I recommend separating those other specs somehow to reduce the risk of a situation when calling `rspec` would BOTH load specs that require `rails_helper` and `integration_helper`. Please feel free to share your experience with this setup. - Phil -- You received this message because you are subscribed to the Google Groups "rspec" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/rspec/CAAk5Ok-beeUvqgx0PkF2Jt2tg%2BWsC8KBNpgtY972_V161eqZaw%40mail.gmail.com.
