Test Rails app for greatest_n_per_group