AndrewReitz / android-spock

Running Spock on Android
Apache License 2.0
89 stars 6 forks source link

Keep instrumentation and unit tests separate #14

Closed jaredsburrows closed 9 years ago

jaredsburrows commented 9 years ago

Is there any reason why the tests "have" to be with the instrumentation tests in androidTest?

AndrewReitz commented 9 years ago

I don't think I understand the question. Could you elaborate more?

jaredsburrows commented 9 years ago

Instrumentation tests should go into the androidTest folder while unit tests should go into the test folder.

AndrewReitz commented 9 years ago

I agree with your statement. I don't understand where it's coming from.

jaredsburrows commented 9 years ago

I don't understand where it's coming from.

From your README.md:

Write your tests

Tests must be placed in the ./src/androidTest/groovy directory.

Write your tests like you would regular spock tests. See the spock-android-sample project and Spock >Framework for more details.

It clearly says: "Tests must be placed in the ./src/androidTest/groovy directory."

AndrewReitz commented 9 years ago

That is not an incorrect statement.

AndrewReitz commented 9 years ago

If you have a suggestion for an edit, feel free to do a pull request.

jaredsburrows commented 9 years ago

Why are you forcing users to put tests in the androidTest folder? Why and what are the limitations?

AndrewReitz commented 9 years ago

If I remember correctly it's this https://github.com/groovy/groovy-android-gradle-plugin/blob/master/src/main/groovy/groovyx/grooid/GroovyAndroidPlugin.groovy#L77

jaredsburrows commented 9 years ago

I guess I could make a pull request there. I would like to be able to use Spock with my current tests. I guess this is just an example repo and not the actual plugin itself. Sorry about the confusion.

AndrewReitz commented 9 years ago

The library itself provides some spock extensions and ability to use spock mocks in Android. That's all for now.

jaredsburrows commented 9 years ago

Sounds good.