Skip to content

Instantly share code, notes, and snippets.

@leesmith
Created February 6, 2014 21:37
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 leesmith/8852964 to your computer and use it in GitHub Desktop.
Save leesmith/8852964 to your computer and use it in GitHub Desktop.
Control garbage collection in rspec
RSpec.configure do |config|
# ...snip
config.before(:each) do
DatabaseCleaner.start
GC.disable
end
config.after(:each) do
DatabaseCleaner.clean
GC.enable
end
# ...snip
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment