Skip to content

Instantly share code, notes, and snippets.

@yeeguy
yeeguy / oscar_the_grouch.rb
Created June 21, 2012 08:27
Faster rspec tests thru dialing down ruby garbage collection
# place in <app root>/spec/support
RSpec.configure do |config|
# from https://gist.github.com/1121972
config.before(:suite) { GC.disable }
config.after(:suite) { GC.enable }
$example_counter = 0
@yeeguy
yeeguy / quickerclip.rb
Created June 21, 2012 08:25
Faster rspec tests with Paperclip
# inspired by https://gist.github.com/406460 and
# http://pivotallabs.com/users/rolson/blog/articles/1249-stubbing-out-paperclip-imagemagick-in-tests
# plus some additional monkeypatching to prevent "too many files open" err's
#
# place this file in <app root>/spec/support
#
RSpec.configure do |config|
$paperclip_stub_size = "800x800"
end