scalatest irgnores classpath?

14 views
Skip to first unread message

Daniel Lincke

unread,
Mar 18, 2017, 2:25:28 PM3/18/17
to scala-user
Hi,

I have written a test for scalatest:
package a.b

import org.scalatest._
import org.scalactic.TolerantNumerics

class MyTest extends FlatSpec with Matchers {
...
}

I compiled into the lib directory of my project directory, and executing
from that directory works fine:

..myproject/lib$ scala org.scalatest.run a.b.MyTest
Run starting. ...
All tests passed.

Going one directory up I cannot run the test anymore:

..myproject$ scala -cp pathto_myproject/lib/ org.scalatest.run a.b.MyTest
*** RUN ABORTED ***
java.lang.ClassNotFoundException: a.b.MyTest

I tried all kinds of quotes for the classpath, I also check with
-Ylog-classpath ... the pathto_myproject/lib/ directory appears under
userClassPath = pathto_myproject/lib/


What is the problem here?

Thanks,
Daniel



--
Dr. Daniel Lincke

tel: +49 30 2060 738-22
fax: +49 30-2060738-33
email: daniel...@globalclimateforum.org
web: http://www.globalclimateforum.org/index.php?id=daniel-lincke

Global Climate Forum
Adaptation and Social Learning
Neue Promenade 6, 10178 Berlin, Germany

Reply all
Reply to author
Forward
0 new messages