Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unit-testing Spring applications using Scala's Specs

We have a large infrastructure that's highly dependent on Spring Framework. Recently I began writing code in Scala and test it using Specs. This is all great but at some point I need to use Spring-dependent features (Such as a HibernateDaoSupport-based DAO).

Has anyone managed to use the SpringJUnit4ClassRunner class to run Specs tests? Does anyone have a different direction as to how to achieve this goal?

Thanks

like image 397
Electric Monk Avatar asked Jan 04 '11 11:01

Electric Monk


1 Answers

I've struggled with the class runner in a similarly awkward scenario once and then I created a MethodRule implementation called TemporarySpringContext that could also solve your problem I think.

like image 195
iwein Avatar answered Nov 13 '22 13:11

iwein