How can I build scala to the same place with IntelliJ and sbt?

I am doing a bit of BDD with cucumber, scala and IntelliJ.  All seems to work OK (other than issues with Apache Spark, detailed in a different thread) BUT...

I have to specify a path to my features like this:

 
package stepdefs

import cucumber.api.junit.Cucumber
import cucumber.api.junit.Cucumber.Options
import org.junit.runner.RunWith

@RunWith(classOf[Cucumber])
@Options(

  features = Array("src/test/resources/features"),
  glue = Array("stepdefs"),
  format = Array("pretty", "html:target/cucumber-report")
  //, tags = Array("@wip")
)
class RunCucumber {
}


Specifying the relative path of the feature files.  But this doesn't run under IntelliJ.  The feature files are in "MyProject\src\test\resources\features" but when I run tests under intelliJ, my working directory is "\.idea\modules\src\test\resources\features", so the tests can't found.

Is there a way I can...

A) Stop idea building in a different area - making it build and execute tests in the project folder

B) Use some technique to specify the location of my feature files that'll work with IntelliJ and sbt without me having to change the constant!

I'd also appreciate any tips on how to do BDD with scala/IntelliJ!

Thanks,

Dan

0

Please sign in to leave a comment.