Running/debugging specs/tests with RAILS_ENV=test

Hi,

Is it possible to specify that whenever I run something called *.spec it should set the RAILS_ENV to test?

Regards,
Nicholas F

1
3 comments

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

1

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.

0

Brilliant - it *just works* wins everytime.

Thanks Roman.

0

Please sign in to leave a comment.