Linear Search with Ruby tested with rspec