dont do speedup magic on travis

This commit is contained in:
Maxwell Salzberg 2012-04-05 12:28:07 -07:00
parent 2e86d069b8
commit 20fee66eee
3 changed files with 5 additions and 5 deletions

View file

@ -104,8 +104,8 @@ end
# https://makandracards.com/makandra/950-speed-up-rspec-by-deferring-garbage-collection # https://makandracards.com/makandra/950-speed-up-rspec-by-deferring-garbage-collection
require File.join(File.dirname(__FILE__), "..", "..", "spec", "support", "deferred_garbage_collection") require File.join(File.dirname(__FILE__), "..", "..", "spec", "support", "deferred_garbage_collection")
Before do Before do
DeferredGarbageCollection.start DeferredGarbageCollection.start unless ENV['TRAVIS']
end end
After do After do
DeferredGarbageCollection.reconsider DeferredGarbageCollection.reconsider unless ENV['TRAVIS']
end end

View file

@ -105,9 +105,9 @@ end
# https://makandracards.com/makandra/950-speed-up-rspec-by-deferring-garbage-collection # https://makandracards.com/makandra/950-speed-up-rspec-by-deferring-garbage-collection
RSpec.configure do |config| RSpec.configure do |config|
config.before(:all) do config.before(:all) do
DeferredGarbageCollection.start DeferredGarbageCollection.start unless ENV['TRAVIS']
end end
config.after(:all) do config.after(:all) do
DeferredGarbageCollection.reconsider DeferredGarbageCollection.reconsider unless ENV['TRAVIS']
end end
end end

View file

@ -2,7 +2,7 @@
# https://makandracards.com/makandra/950-speed-up-rspec-by-deferring-garbage-collection # https://makandracards.com/makandra/950-speed-up-rspec-by-deferring-garbage-collection
class DeferredGarbageCollection class DeferredGarbageCollection
DEFERRED_GC_THRESHOLD = (ENV['DEFER_GC'] || 2.0).to_f #used to be 10.0 DEFERRED_GC_THRESHOLD = (ENV['DEFER_GC'] || 10.0).to_f #used to be 10.0
@@last_gc_run = Time.now @@last_gc_run = Time.now