These are chat archives for etorreborre/specs2

11th
May 2015
SRGOM
@SRGOM
May 11 2015 10:44
Does anyone here have luck with skipping tags? re: How to mark a 'should' block with a tag, and how to have sbt skip that tag? I have tried the following:
import org.specs2.specification.Tags //Also tried org.specs2.mutable.Tags so that Specification can be extended with it.
import org.specs2.specification.Tags.section //internet says avoid using mutable.Tags.section, but as a matter of fact that is only a trait with no companion object. So no section there.

object MyTest extends Specification with Tags{ 
    "SomeComponent" should  { ..... } section( "SLOW" )
} 

object MyTest2 extends Specification with Tags{ 
     section( "SLOW" ) "SomeComponent2" should  { ..... } section( "SLOW" )
} 

#On command prompt
$ activator '~testOnly test.snapshot.Main -- exclude(TakesSnapshot)'
Eric Torreborre
@etorreborre
May 11 2015 11:50
The section must be declared before 'should' and the command line syntax is -- exclude TakesSnapshot
SRGOM
@SRGOM
May 11 2015 11:51
@etorreborre : Like this?
object MyTest2 extends Specification with Tags{ 
   "SomeComponent2" section( "SLOW" )  should  { ..... } 
} 
let me try
Eric Torreborre
@etorreborre
May 11 2015 11:52
Or use SLOW if that's your tag name
No before the text SomeComponent2
Which specs2 version do you have?
SRGOM
@SRGOM
May 11 2015 11:55
I'm on play 2.3.7, checking now what version of specs2 does it have
Also, --exclude SLOW doesn't work
java.lang.IllegalArgumentException: Invalid configuration, example valid configuration: exclude(a, b, c)
Specs is 2.3.12
section( "SLOW" ) "SomeComponent3" should{  //notice section on the same line as the should statement, compile fails. 
//--------------------The following compiles fine. However, doesn't wrk
section( "SLOW" ) 
 "SomeComponent4" should{  
Eric Torreborre
@etorreborre
May 11 2015 12:02
I don't know how activator checks the command line arguments compared to plain Sbt. I'll try tomorrow from my laptop (it's 10 pm here)
SRGOM
@SRGOM
May 11 2015 12:03
Ok. Thank you for your help. Sleep peacefully!