diff --git a/spec/lib/object_serializer_performance_spec.rb b/spec/lib/object_serializer_performance_spec.rb index e2c4630..b23b23a 100644 --- a/spec/lib/object_serializer_performance_spec.rb +++ b/spec/lib/object_serializer_performance_spec.rb @@ -4,6 +4,9 @@ describe FastJsonapi::ObjectSerializer, performance: true do include_context 'movie class' include_context 'ams movie class' + before(:all) { GC.disable } + after(:all) { GC.enable } + context 'when testing performance of serialization' do it 'should create a hash of 1000 records in less than 50 ms' do movies = 1000.times.map { |_i| movie }