Skip to content
This repository has been archived by the owner on Aug 12, 2019. It is now read-only.

Commit

Permalink
Resolving some problems I encountered on a fresh checkout with "./sbt…
Browse files Browse the repository at this point in the history
… test":

* fixing deprecation warning by using "sys.exit()" instead of just "exit()"
* fixing deprecation warning by using "extends App" instead of "extends Application"
* fixing broken unit test by asserting the start of the input string has an indexOf > 0
  • Loading branch information
tom.vaughan committed Feb 29, 2012
1 parent 0d7aee1 commit f068381
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scala_29/lift_blank/src/test/scala/LiftConsole.scala
Expand Up @@ -10,6 +10,6 @@ object LiftConsole {
// Now run the MainGenericRunner to get your repl
MainGenericRunner.main(args)
// After the repl exits, then exit the scala script
exit(0)
sys.exit(0)
}
}
2 changes: 1 addition & 1 deletion scala_29/lift_blank/src/test/scala/RunWebApp.scala
Expand Up @@ -3,7 +3,7 @@ import org.mortbay.jetty.Server
import org.mortbay.jetty.webapp.WebAppContext
import org.mortbay.jetty.nio._

object RunWebApp extends Application {
object RunWebApp extends App {
val server = new Server
val scc = new SelectChannelConnector
scc.setPort(8080)
Expand Down
Expand Up @@ -37,7 +37,7 @@ object HelloWorldTestSpecs extends Specification {
val str = hello.howdy(<span>Welcome to your Lift app at <span id="time">Time goes here</span></span>).toString

str.indexOf(stableTime.toString) must be >= 0
str.indexOf("Hello at") must be >= 0
str.indexOf("Welcome to") must be >= 0
}
}
}

0 comments on commit f068381

Please sign in to comment.