Query called in the index method is useless, i removed it . This query is called from the HomeController i cant call it in the trends_controller_spec.rb.