Permalink
Browse files

added missing files

  • Loading branch information...
1 parent 3ddc285 commit a55ea2a33df6e825403f04a966dff26c55ba47ee Diego Medina committed Aug 22, 2011
@@ -1,19 +1,31 @@
import sbt._
class LiftProject(info: ProjectInfo) extends DefaultWebProject(info) {
- val liftVersion = "2.3"
+ val liftVersion = "2.4-M3"
+ override def testClasspath = super.testClasspath +++ ("src" / "main" / "webapp")
+
+ def specs2Framework = new TestFramework("org.specs2.runner.SpecsFramework")
+ override def testFrameworks = super.testFrameworks ++ Seq(specs2Framework)
+
+ override def includeTest(s: String) = s.endsWith("Spec")
// uncomment the following if you want to use the snapshot repo
- // val scalatoolsSnapshot = ScalaToolsSnapshots
+ val scalatoolsSnapshot = ScalaToolsSnapshots
+ val sonatype_snapshot = "Sonatype snapshots" at "http://oss.sonatype.org/content/repositories/snapshots"
// If you're using JRebel for Lift development, uncomment
// this line
// override def scanDirectories = Nil
override def libraryDependencies = Set(
+ "junit" % "junit" % "4.5" % "test->default",
+ "org.seleniumhq.selenium" % "selenium" % "2.0rc2" % "test" ,
+ "org.seleniumhq.selenium" % "selenium-server" % "2.0rc2" % "test" withSources (),
"net.liftweb" %% "lift-webkit" % liftVersion % "compile",
"org.mortbay.jetty" % "jetty" % "6.1.22" % "test",
- "junit" % "junit" % "4.5" % "test",
+ "org.specs2" %% "specs2" % "1.4" % "test",
+ "org.specs2" %% "specs2-scalaz-core" % "5.1-SNAPSHOT" % "test",
+ "org.scalatest" % "scalatest" % "1.3" % "test->default",
"ch.qos.logback" % "logback-classic" % "0.9.26"
) ++ super.libraryDependencies
}
@@ -1,13 +0,0 @@
-package code
-
-import org.openqa.selenium.firefox.FirefoxDriver
-object HangTest {
- def main(args: Array[String]) {
- val server = new MyServer().start()
- val webDriver = new FirefoxDriver()
- webDriver.navigate.to("http://localhost:8080/")
- Thread.sleep(1000)
- webDriver.close()
- server.stop()
- }
-}
@@ -1,29 +0,0 @@
-package code
-
-import org.eclipse.jetty.server.Server
-import org.eclipse.jetty.webapp.WebAppContext
-
-class MyServer {
- val server = new Server(8080)
- val context = new WebAppContext()
- context.setServer(server)
- context.setContextPath("/")
- context.setWar("src/main/webapp")
- server.setHandler(context)
-
- def start() = {
- server.start()
- this
- }
-
- def stop() {
- server.stop()
- server.join()
- }
-}
-
-object MyServer {
- def main(args: Array[String]) {
- new MyServer().start()
- }
-}
@@ -1,15 +0,0 @@
-import code.MyServer
-import org.openqa.selenium.firefox.{FirefoxProfile, FirefoxDriver}
-import org.specs2.mutable.Specification
-
-class HangSpec extends Specification {
- "this test completes, but jvm never shutsdown" in {
- val server = new MyServer().start()
- val webDriver = new FirefoxDriver(new FirefoxProfile())
- webDriver.navigate.to("http://localhost:8080/")
- Thread.sleep(1000)
- webDriver.close()
- server.stop()
- success
- }
-}

0 comments on commit a55ea2a

Please sign in to comment.