Skip to content

Instantly share code, notes, and snippets.

@databyte
Created October 24, 2011 06:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save databyte/1308481 to your computer and use it in GitHub Desktop.
Save databyte/1308481 to your computer and use it in GitHub Desktop.
Speed up GC for specs
$gc_counter = 0
GC.disable
config.after(:each) {
if($gc_counter.modulo(25) == 0)
GC.enable
GC.start
GC.disable
end
$gc_counter += 1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment