Typesafe Activator's/Play 2.x DB console app testing
When you want to test your models (access to DB's, webservices, etc) using the Typesafe's Activator's/Play 2.x console you need to enable your Application enviroment:
//First Run the Activator
$./activator
//once in he shell tun the console
[my_project] $ console
//load the project!
scala> new play.core.StaticApplication(new java.io.File("."))
//Now load your models or other resources to test.
scala> import models._
//HAVE FUN!
scala> MyModel.count()
Written by Octavio Luna
Related protips
1 Response
but how do you can automatize it?
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Scala
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#