2020/08/31
Rails.env.test? is always preferable to writing Rails.env == "test". The behavior that powers this predicate method is the ActiveSupport::StringInquirer class.
This is not new information. But what was new, is finding the .inquiry method that is added to a whole bunch of objects, including strings and arrays..
"test".inquiry.test?
%w[this that other].inquiry.other?
Neat!