Skip to content

Commit 71ad9cc

Browse files
committed
fix check for spring running
1 parent 2e90485 commit 71ad9cc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

config/environments/test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# Settings specified here will take precedence over those in config/application.rb.
1111

1212
# While tests run files are not watched, reloading is not necessary. (unless you are using Spring)
13-
config.enable_reloading = defined?(Spring)
13+
config.enable_reloading = ENV["SPRING_SPAWN_ENV"].present?
1414

1515
# Eager loading loads your entire application. When running a single test locally,
1616
# this is usually not necessary, and can slow down your test suite. However, it's

spec/rails_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# see https://github.com/rails/rails/issues/49958
2727
# somehow this does not work with spring. I have no time to debug this, only one test is failing without this line
2828
# and mostly using spring to run single tests so this is not a problem for me
29-
RSpec::Matchers::AliasedNegatedMatcher.undef_method(:with) unless defined?(Spring)
29+
RSpec::Matchers::AliasedNegatedMatcher.undef_method(:with) unless ENV["SPRING_SPAWN_ENV"]
3030
RSpec::Matchers.define_negated_matcher :have_not_enqueued_mail, :have_enqueued_mail
3131

3232
# Configuration for Shoulda::Matchers

0 commit comments

Comments
 (0)