We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ecac77b + 8acac38 commit 4aced75Copy full SHA for 4aced75
lib/generators/rspec/install/templates/spec/rails_helper.rb
@@ -4,6 +4,11 @@
4
require_relative '../config/environment'
5
# Prevent database truncation if the environment is production
6
abort("The Rails environment is running in production mode!") if Rails.env.production?
7
+<% if RSpec::Rails::FeatureCheck.has_active_record_migration? -%>
8
+# Uncomment the line below in case you have `--require rails_helper` in the `.rspec` file
9
+# that will avoid rails generators crashing because migrations haven't been run yet
10
+# return unless Rails.env.test?
11
+<% end -%>
12
require 'rspec/rails'
13
# Add additional requires below this line. Rails is not loaded until this point!
14
0 commit comments