Disable GC before doing performance test

This commit is contained in:
Min.Kim 2018-02-02 14:57:40 +00:00 committed by Shishir Kakaraddi
parent 80bd8b983c
commit fbb9db5201

View File

@ -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 }