Skip to content

Instantly share code, notes, and snippets.

@vilmarbfilho
Created May 23, 2015 19:35
Show Gist options
  • Save vilmarbfilho/32502b5c9459c370d5f4 to your computer and use it in GitHub Desktop.
Save vilmarbfilho/32502b5c9459c370d5f4 to your computer and use it in GitHub Desktop.
Get context application Robolectric
Just use for version 1.x and 2.x:
Robolectric.application;
And for version 3.x:
RuntimeEnvironment.application;
Link: http://stackoverflow.com/questions/13684094/how-can-we-access-context-of-an-application-in-robolectric
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment