What I learned while digging into FactoryGirl’s build_stubbed

Spoiler Alert: I found build_stubbed not viable as a replacement of create​in our test suite. To remove the dependency of the database in tests, I would recommend RSpec’s instance_double instead. Read on to find out why. I was excited to find out that FactoryGirl has methods to create in-memory objects instead of hitting the database. Running a … More What I learned while digging into FactoryGirl’s build_stubbed

Upgrading Postgres in a Rails codebase

If you’re looking to upgrade Postgres locally in a Rails project, it’s straight-forward-yet-not-simple. It’s not a one-click/one-command operation. I used the pg_dump command, along with Homebrew in this example. I have also seen a good post from Christopher Brown and Keita on manually backing up and copying data files using pg_upgrade. These involve a few more steps … More Upgrading Postgres in a Rails codebase