Rspec test for correct file search

Hi!
I wrote a method to locate the file on a given within a directory, the
name and line in it. How to test it? Tell me please, I have daily
headache with this problem…

def search(dir,name,line)

end