Browse files

Add Specs2 and a sample spec

  • Loading branch information...
1 parent 593ae55 commit 8f548c77e1498b86f0ab3457c31580d3931139a2 @Dinduks committed Mar 3, 2013
Showing with 26 additions and 0 deletions.
  1. +7 −0 build.sbt
  2. +19 −0 src/test/scala/com/dindane/mireille/SampleSpec.scala
View
7 build.sbt
@@ -1 +1,8 @@
scalaVersion := "2.10.0"
+
+libraryDependencies ++= Seq(
+ "org.specs2" %% "specs2" % "1.14" % "test"
+)
+
+resolvers ++= Seq("snapshots" at "http://oss.sonatype.org/content/repositories/snapshots",
+ "releases" at "http://oss.sonatype.org/content/repositories/releases")
View
19 src/test/scala/com/dindane/mireille/SampleSpec.scala
@@ -0,0 +1,19 @@
+package test.scala.com.dindane.mireille.SampleSpec
+
+import org.specs2.mutable._
+
+class SampleSpec extends Specification {
+
+ "The 'Hello world' string" should {
+ "contain 11 characters" in {
+ "Hello world" must have size(11)
+ }
+ "start with 'Hello'" in {
+ "Hello world" must startWith("Hello")
+ }
+ "end with 'world'" in {
+ "Hello world" must endWith("world")
+ }
+ }
+
+}

0 comments on commit 8f548c7

Please sign in to comment.