title: Scala: File object for testing (Resource?)
body: <p>I need to pass a File to a class for unit tests.  The class requires a File specifically, and can't be modified - it just reads it.  (So I don't want to try to mock out that class or modify it - just pass it the File it needs.)</p>
  
  <p>What's the recommended way to do this?</p>
  
  <p>I put the file in <code>src/test/resources/...</code> and just passed that entire path in, and, since the test is run in the project root dir, this works.  But this seems quite wrong.</p>
  
  <p><strong>UPDATE:</strong> To emphasize - the class needs a <strong>File</strong> object, not an <strong>InputStream</strong> or anything else.</p>