Search code examples
specs2

Unresolved symbol s2 in Specs2 class


When I compile my specification, the compiler tells me

"error: value s2 is not a member of StringContext"

The salient portion of my specification class is:

import org.specs2._
import specification._
import mock._

class EnterpriseDirectoryActionSpec extends Specification { def is = s2"""
  An enterprise directory action should provide enabled fields
    after a call to doDefault                                   ${c().e1}
    after a call to doSearchPrevious                            ${c().e2}
    after a call to doSearchNext                                ${c().e3}
    after a call to doExecuteSearch                             ${c().e4}
                                                                """
  ...

What is causing the error, and how can I correct it?

I'm using Specs2 (artifact specs2_2.10) version 1.14.


Solution

  • You need to use a later version of specs2: specs2-2.0-RC1or specs2-2.0-RC2-SNAPSHOT