Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Final clean up in specs2

Tags:

scala

specs2

I am writing a specs2 Unittest for my scala software. The execution is working well. The only problem I have, is that I need to clean up after all test are finished. I just cannot find any solution for that. Is there a way to execute some functions after all test are finished?

like image 719
tgr Avatar asked Nov 26 '12 15:11

tgr


Video Answer


1 Answers

You need to add a Step at the end of your specification:

import org.specs2.mutable._

class MySpec extends Specification {

  // lots of examples here

  // cleanup there
  step(cleanUp())
}
like image 177
Eric Avatar answered Oct 05 '22 05:10

Eric