Jamie's Blog

Lessons from a life of startups, coding, countryside, and kids

Getting rid of annoying Postgres output in RSpec

You’ll often see lots of this in your RSpec output if you’re using Postgres:

NOTICE:  CREATE TABLE will create implicit sequence "companiesidseq" for serial column "companies.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "companiespkey" for table "companies"
NOTICE:  CREATE TABLE will create implicit sequence "usersidseq" for serial column "users.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "userspkey" for table "users"
<!–more–> Just add the minmessages attribute to your test database definition:
test:
  adapter: postgresql
  encoding: unicode
  database: myapptest
  pool: 5
  username: me
  password: secret
  min_messages: warning