Advertisement
Guest User

ScalaTest

a guest
Feb 2nd, 2015
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.54 KB | None | 0 0
  1. package bm4scala
  2.  
  3. import org.specs2.mutable.Before
  4. import org.specs2.mutable.Specification
  5. import org.specs2.matcher.DataTables
  6.  
  7. class SomeSuite extends Specification with DataTables {
  8.  
  9.   val context = new Before { def before = println("BEFORE") }
  10.  
  11.   "The 'Hello world' string" should {
  12.     "contain 11 characters" in {
  13.       "Hello world" must have size (11)
  14.     }
  15.     "start with 'Hello'" in {
  16.       "Hello world" must startWith("Hello")
  17.     }
  18.     "end with 'world'" in {
  19.       "Hello world" must endWith("world")
  20.     }
  21.   }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement