Skip to content

Commit

Permalink
Remove Ruby GC config from spec helper (mastodon#25455)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjankowski authored Jun 15, 2023
1 parent e686a54 commit b276b3b
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# frozen_string_literal: true

GC.disable

if ENV['DISABLE_SIMPLECOV'] != 'true'
require 'simplecov'
SimpleCov.start 'rails' do
Expand All @@ -13,8 +11,6 @@
end
end

gc_counter = -1

RSpec.configure do |config|
config.example_status_persistence_file_path = 'tmp/rspec/examples.txt'
config.expect_with :rspec do |expectations|
Expand All @@ -37,21 +33,8 @@
end

config.after :suite do
gc_counter = 0
FileUtils.rm_rf(Dir[Rails.root.join('spec', 'test_files')])
end

config.after :each do
gc_counter += 1

if gc_counter > 19
GC.enable
GC.start
GC.disable

gc_counter = 0
end
end
end

def body_as_json
Expand Down

0 comments on commit b276b3b

Please sign in to comment.