Add rspec test for search method