fix query so it returns the results; set up rspec