code et al
jordan at jordanhollinger dot com
powered by eridu

Showing recent posts tagged with rails

The perfect RSpec config

December 21, 2012 | rails, ruby

Here is the optimal RSpec config for Database Cleaner, transactions, Javascript, and speed. This post assumes you've already got RSpec working, but you want to optimize your use of Database Cleaner.

Obviously you want to run all your tests in transactions but can't, because you're using Selenium, capybara-webkit, or something else that won't work with transactions. Most advice tells you to just use Database Cleaner with truncation. That's slow. Really slow if you're working with a huge Rails app with hundreds of tables. (Yes they exist, because I work on one.)

read more →

Parsing Rails logs with Beaver

September 1, 2011 | rails, ruby

Rails's production logs contain a wealth of information, but I have found them to be rather parsimonious with it. Aside from manually reading through them, I have never found a good tool for parsing them into programmatically usable data.

So like any good programmer, I wrote one...

read more →