My rake tasks for running Cucumber and RSpec tests are always using my development
environment.
Here are the relevant config files:
RAILS_ROOT
On RAILS_ROOT/Gemfile
do: add specific test-only gems to this group:
group :test do
gem 'cucumber-rails'
gem 'capybara'
gem 'database_cleaner'
end
Instead of setting them to be used on development and everywhere else too. This should work.
P.S: edit the code above to set the gems you'll be using for your test, I just copy/pasted the ones Im using on the project I have currently open as an example.