Test cases for bug in ActiveRecord + PostgreSQL views