Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is spec_helper having this ENV["RAILS_ENV"] ||= "test"?

Would anyone want to make use of spec_helper in other environments than test, or why is it configured like that? To allow custom test environments?

like image 419
Geo Avatar asked Nov 04 '22 00:11

Geo


1 Answers

An environment can have any possible name. You can use multiple test environments or even give your test environment another name than simply test. Because it's convention to name your test environment test doesn't mean you can't choose to name it differently.

like image 182
Jaap Haagmans Avatar answered Nov 15 '22 13:11

Jaap Haagmans