Skip to content

Commit

Permalink
Update Robolectric to 3.1 (artem-zinnatullin#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
Plastix authored and artem-zinnatullin committed Jul 12, 2016
1 parent 40045de commit c24c3da
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
public class QualityMattersIntegrationRobolectricTestRunner extends RobolectricGradleTestRunner {

// This value should be changed as soon as Robolectric will support newer api.
private static final int SDK_EMULATE_LEVEL = 21;
private static final int SDK_EMULATE_LEVEL = 23;

public QualityMattersIntegrationRobolectricTestRunner(@NonNull Class<?> klass) throws Exception {
super(klass);
Expand All @@ -26,10 +26,13 @@ public Config getConfig(@NonNull Method method) {
defaultConfig.manifest(),
defaultConfig.qualifiers(),
defaultConfig.packageName(),
defaultConfig.abiSplit(),
defaultConfig.resourceDir(),
defaultConfig.assetDir(),
defaultConfig.buildDir(),
defaultConfig.shadows(),
QualityMattersIntegrationTestApp.class,
defaultConfig.instrumentedPackages(),
QualityMattersUnitTestApp.class, // Notice that we override real application class for Unit tests.
defaultConfig.libraries(),
defaultConfig.constants() == Void.class ? BuildConfig.class : defaultConfig.constants()
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
public class QualityMattersRobolectricUnitTestRunner extends RobolectricGradleTestRunner {

// This value should be changed as soon as Robolectric will support newer api.
private static final int SDK_EMULATE_LEVEL = 21;
private static final int SDK_EMULATE_LEVEL = 23;

public QualityMattersRobolectricUnitTestRunner(@NonNull Class<?> klass) throws Exception {
super(klass);
Expand All @@ -26,9 +26,12 @@ public Config getConfig(@NonNull Method method) {
defaultConfig.manifest(),
defaultConfig.qualifiers(),
defaultConfig.packageName(),
defaultConfig.abiSplit(),
defaultConfig.resourceDir(),
defaultConfig.assetDir(),
defaultConfig.buildDir(),
defaultConfig.shadows(),
defaultConfig.instrumentedPackages(),
QualityMattersUnitTestApp.class, // Notice that we override real application class for Unit tests.
defaultConfig.libraries(),
defaultConfig.constants() == Void.class ? BuildConfig.class : defaultConfig.constants()
Expand Down
2 changes: 1 addition & 1 deletion dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ ext.versions = [
processPhoenix : '1.0.2',

junit : '4.12',
robolectric : '3.0',
robolectric : '3.1',
assertJ : '2.4.0',
equalsVerifier : '1.7.5',
mockito : '1.10.19',
Expand Down

0 comments on commit c24c3da

Please sign in to comment.