title: What is the use of any_instance method in Rails
body: <p>I see the following line in one of the test files in rails. It has a method called as <code>any_instance</code>. What is its use? Can someone please explain</p>
  
  <pre><code>http = Net::HTTP.new(Person.site.host, Person.site.port)
  ActiveResource::Connection.any_instance.expects(:http).returns(http)
  http.expects(:request).returns(ActiveResource::Response.new(""))
  </code></pre>
  
  <p>Thanks</p>