Project

General

Profile

Actions

Patch #4572

closed

Make it harder to ruin your database

Added by Alexey Palazhchenko almost 15 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
2010-01-13
Due date:
% Done:

100%

Estimated time:

Description

New Rails apps have
ENV["RAILS_ENV"] = "test"
in test_helper.rb.

You have
ENV["RAILS_ENV"] ||= "test"

Good I have backups. :)

Please add this line:
abort "Preventing you from running tests in '#{ENV['RAILS_ENV']}' environment." unless ENV["RAILS_ENV"] =~ /^test/

Actions

Also available in: Atom PDF