Does creating an activity using the .withIntent() not work in Robolectric 2? I\'m doing the following
.withIntent()
activity = Robolectric.buildActivity(
This is a case where a fluent-style API kinds of leads you down the wrong path...
You want to:
activity = Robolectric.buildActivity(MyActivity.class) .withIntent(intent) .create() .get();
so that the intent is provided to the builder before it calls onCreate().