These are chat archives for etorreborre/specs2

9th
Jul 2016
Edmondo Porcu
@edmondo1984
Jul 09 2016 10:27
Hello, I have the same skeleton test which I would like to run in two ways, in integration and unit test using two different databases.
so I was thinking to have a set of specifications that take a db as an argument, and then run only an index
Edmondo Porcu
@edmondo1984
Jul 09 2016 11:56
does it make sense to have two different sbt configurations, one that run IntegartionSpecIndex and the other that runs UnitSpecIndex?
Eric Torreborre
@etorreborre
Jul 09 2016 11:59
I personally prefer to use tags to do this rather than sbt configurations
Edmondo Porcu
@edmondo1984
Jul 09 2016 11:59
well what I mean is that I need to run
exactly the same collection of specs, all of them take an argument.
as a constructor arg
Eric Torreborre
@etorreborre
Jul 09 2016 11:59
remember that you can grab the command line arguments in a spec to decide what to do.
sorry I have to go now, maybe if you can post a gist we can iterate from there
Edmondo Porcu
@edmondo1984
Jul 09 2016 12:00
so how would you have two different specs2 configuration in SBT?
testOptions in Test = Seq("-environment","unit") ?
Edmondo Porcu
@edmondo1984
Jul 09 2016 17:34
Actually I would really like to have some tests that I execute only in Integration and others only in unit testing, but they are basically the same test