title: Robolectric not using test application
body: <p>According to <a href="http://robolectric.blogspot.com/2013/04/the-test-lifecycle-in-20.html">this link</a> I can create a test application which Robolectric will automatically start using in tests.  I cannot get this to work.</p>
  
  <p>I am using Dagger for dependency injection and have created injection wrapper classes for <code>Activity</code> and <code>Application</code>.  Then each of my activities extends the wrapper activity class instead of plain old <code>Activity</code>.</p>
  
  <p>The problem I am having is that, in tests, the dependencies provided by the <code>Application</code> modules can't be resolved and so the tests fail.  This is because most of our tests are just building an activity (using <code>Robolectric.buildActivity()</code>) and aren't running from an <code>Application</code>.</p>
  
  <p>I was hoping to somehow modify the Robolectric testrunner to run our tests under the <code>Application</code>.  Either that or use a test application as outlined in that link above.</p>
  
  <p>I've created a test application and am still getting the same test errors because the tests aren't running under this test application.  I've tried moving the test application to different packages etc, but nothing changes.</p>
  
  <p>I'm looking for some advice on how to go about doing what I want.  Would be particularly interested in those with experience with Dagger and how they go about testing.</p>