add specs for rails_environments helper method introduced in #5170