spec links and sequential execution

33 views
Skip to first unread message

ven dev

unread,
Jul 20, 2012, 3:57:25 PM7/20/12
to specs2...@googlegroups.com
I have a specification that acts as an index and simply contains two links to other specifications:

import org.specs2.Specification

class MySpec extends Specification {
sequential
def is = {
"My Specification".title ^
"Sign-Up Specification" ~ new SignUpSpec ^ p ^
"Login Specification" ~ new LoginSpec

}

}

i need the first spec to finish executing before the second begins, i know that theres sequential settings for specs2 as well as sbt but so far i cant seem to get any combination of the two to work properly
 does the fact that they are links effect the sequential execution of the specs? my question is weather or not i should focus on sbts settings or specs2 settings

in my build i have

     parallelExecution in Test := false,
    testOptions in Test += Tests.Argument("sequential", "true")

etorreborre

unread,
Jul 20, 2012, 7:28:38 PM7/20/12
to specs2...@googlegroups.com
There is a small mistake in your specification :-).

`sequential` needs to be part of the definition:

class MySpec extends Specification {
  def is = 
    sequential ^
  "My Specification".title ^
"Sign-Up Specification" ~ new SignUpSpec ^ p ^
"Login Specification" ~ new LoginSpec
}

The way you wrote it before `sequential` is just lost in the initialization of the class body.

Eric.

ven dev

unread,
Jul 23, 2012, 1:31:53 PM7/23/12
to specs2...@googlegroups.com
that did the trick, thank you!
Reply all
Reply to author
Forward
0 new messages