Running/debugging specs/tests with RAILS_ENV=test Follow Nicholas F Created November 26, 2008 22:00 Hi,Is it possible to specify that whenever I run something called *.spec it should set the RAILS_ENV to test?Regards,Nicholas F
Yes,you can change default settings for new RSpec run configurations - go to "Run | Edit Configurations | Edit Defaults | RSpec" and set RAILS_ENV environment variables (click on "..." button near "Environment Variables" text field). After these settings will be applied for all new RSpec run configurations. Also we can improve our settings and by default add this environment variable to all new rspec/test::unit run configurations for rails project
Update: In the next EAP RubyMine will automatically add RAILS_ENV=test variable to new spec/test::unit run configurations if value of this env variable isn't overridden default configurations settings.
Brilliant - it *just works* wins everytime.