Skip to content

Commit

Permalink
robolectriv test using 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Chiara Chiappini committed Nov 6, 2015
1 parent 740a4cd commit f271d56
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 21 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,4 @@ before_install:

script:
- ./gradlew :londonWeather:clean :londonWeather:testDebugUnitTest :londonWeather:connectedAndroidTest
#- ls /home/travis/build/kul3r4/droidConf/londonWeather/build/outputs/apk/londonWeather-debug.apk
#- ./gradlew :londonWeatherAcceptance:test --stacktrace --debug -DANDROID_HOME=/usr/local/android-sdk/

18 changes: 1 addition & 17 deletions londonWeather/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -77,21 +77,5 @@ dependencies {

testCompile 'junit:junit:4.12'
testCompile project(':londonweatherlib')
testCompile('org.robolectric:robolectric:3.1-SNAPSHOT') {
exclude module: 'classworlds'
exclude module: 'commons-logging'
exclude module: 'httpclient'
exclude module: 'maven-artifact'
exclude module: 'maven-artifact-manager'
exclude module: 'maven-error-diagnostics'
exclude module: 'maven-model'
exclude module: 'maven-project'
exclude module: 'maven-settings'
exclude module: 'plexus-container-default'
exclude module: 'plexus-interpolation'
exclude module: 'plexus-utils'
exclude module: 'wagon-file'
exclude module: 'wagon-http-lightweight'
exclude module: 'wagon-provider-api'
}
testCompile 'org.robolectric:robolectric:3.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.Robolectric;
import org.robolectric.RobolectricGradleTestRunner;
import org.robolectric.annotation.Config;

import static junit.framework.Assert.assertNotNull;

@Config(constants = BuildConfig.class, sdk = 22)
@RunWith(MyRobolectricGradleTestRunner.class)
@RunWith(RobolectricGradleTestRunner.class)
@Config(constants = BuildConfig.class, sdk = 21)
public class MainActivityTest {

private Activity mainActivity;
Expand Down

0 comments on commit f271d56

Please sign in to comment.