Adjusting specs to have more explicit deps

Instead of relying on the database connection, which slows things down
moving towards more isolated specs.
Adding conversion via #to_predicate_set