Skip to content

Commit

Permalink
Optional Rails.cache reset before each test.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Jul 25, 2023
1 parent b237bc8 commit 21ddb96
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
require "minitest/autorun"
require "minitest/pride"
require "rack/test"
# require "rails"
require "active_support"
require "rack/attack"

Expand All @@ -28,11 +27,11 @@ def safe_require(name)
class MiniTest::Spec
include Rack::Test::Methods

# if Object.const_defined?(:Rails)
# before do
# Rails.cache = nil
# end
# end
before do
if Object.const_defined?(:Rails)
Rails.cache = nil
end
end

after do
Rack::Attack.clear_configuration
Expand Down

0 comments on commit 21ddb96

Please sign in to comment.