title: Mockito for Objects in Scala
body: <p>I'm using Scala 2.10, specs2 and Mockito. I want to mock scala.io.Source.fromURL(). The issue seems to be fromURL() is a function in <a href="http://www.scala-lang.org/api/current/index.html#scala.io.Source%24">io.Source's object</a>.</p>
  
  <pre><code>val m = mock[io.Source]
  m.fromURL returns io.Source.fromString("Some random string.")
  </code></pre>
  
  <p>It's a pretty straightforward mock in an Unit test. Why isn't it working?</p>
  
  <p>Thanks!</p>