Blog (tests)
Please also see this blog post on tweaking your ruby GC settings.
I use and love DatabaseCleaner, although historically I had never paid too much attention on the performance of its varies cleaning strategies - I’d always used truncation.
We use Postgres, and after digging around and finding out the difference between DELETE and TRUNCATE, I ended up improving our test suite speed by about 30-40% simply by tweaking the cleaning strategies.
RSpec.configure do |config|
config.before :su...
It was made apparent to me that many ruby devs either aren’t aware or couldn’t be bothered to tweak their ruby garbage collector settings.
Well, if you are using MRI, please start tweaking your GC settings. Here’s what I use (on my 15" Macbook Pro Retina):
export RUBY_GC_MALLOC_LIMIT=90000000
export RUBY_FREE_MIN=200000
Not only can you tweak it for your local dev machine, you can also tweak Jenkins, Travis CI, Wercker and other CI solutions, making instant speed gain for your test sui...
Writing good, sensible tests is hard. As a Rubyist, I feel lucky to be part of a community that embraces tests. Though at the same time, I have come across too many projects that suffered from not having sensible tests.
What are Sensible Tests?
There often isn’t a silver bullet when it comes to software development. Technical stuff aside, many things contribute to the solution to a given problem - the team, the project and the business to name a few. This article does not attempt to present any...