These are chat archives for etorreborre/specs2

28th
Jan 2019
Edmondo Porcu
@edmondo1984
Jan 28 18:13
Guys is there an obvious way to parse string-lists using the GWT format? CSV would be fine
also is there a support for gherkin-like examples?
Edmondo Porcu
@edmondo1984
Jan 28 18:24
What I want to do is to run the same specifcation twice with two parameters, using the GWT syntax
Edmondo Porcu
@edmondo1984
Jan 28 18:58
The only solution I have found is that I could create a abstract Specification with constructor argument
Edmondo Porcu
@edmondo1984
Jan 28 19:27

The Gherkin-like syntax is very useful to put examples at the bottom of the specification and unfortunately it seems from the documentation that Specs2 doesn't support it. (Although it supports Tables, I wasn't able to find an example with Tables and GWT. Parsers for the GWT syntax do not solve this issue either)

We came up with the following code, is there anything


    class ProcessManagerExample(startActivity:String) extends S2StringContextCreation
      with GWT with SpecificationStructure{



      def is =
        s2"""
             Given I started the process manager for my process ${g1}
             When a process is created at $startActivity $w1
             Then the external task is picked up by an external task processor and fails $t1
      """

      def g1 = step{

      }

      def w1 = step{

      }

      def t1 = {
        ok
      }
    }

So we have the following questions:

  • Is there anything better that can be done, maybe with Tables?
  • How do import all the fragments in our "larger" specification?