File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
lib/generators/rspec/install/templates/spec Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ Enhancements:
12
12
` :use_fixtures => true ` . (Aaron Kromer, #1372 )
13
13
* Include ` rspec:request ` generator for generating request specs; this is an
14
14
alias of ` rspec:integration ` (Aaron Kromer, #1378 )
15
+ * Update ` rails_helper ` generator with a default check to abort the spec run
16
+ when the Rails environment is production. (Aaron Kromer, #1383 )
15
17
16
18
Bug Fixes:
17
19
Original file line number Diff line number Diff line change 1
1
# This file is copied to spec/ when you run 'rails generate rspec:install'
2
2
ENV [ 'RAILS_ENV' ] ||= 'test'
3
- require 'spec_helper'
4
3
require File . expand_path ( '../../config/environment' , __FILE__ )
4
+ # Prevent database truncation if the environment is production
5
+ abort ( "The Rails environment is running in production mode!" ) if Rails . env . production?
6
+ require 'spec_helper'
5
7
require 'rspec/rails'
6
8
# Add additional requires below this line. Rails is not loaded until this point!
7
9
You can’t perform that action at this time.
0 commit comments