Closed zifnab87 closed 7 years ago
Have a look at https://github.com/cloudfoundry-incubator/credhub. We've been using Spectrum to write Spring tests for almost a year, and now the project is open source so we can share this. There's probably a better way to do it, but it's worked for us so far.
There are limitations of this approach which are overcome by the junitMixin feature that is in the latest version of Spectrum. Please see the docs and post any questions on this thread.
I suggest we close this as I believe junitMixin
and the native @Rule
support should now render it obsolete.
In case other users find it interesting you could include that in your Documentation:
I have created a BDDTest class that runs with Spectrum.java and also initializes Spring ApplicationContext
classes that are BDD-style can extend BDDTest like that:
Haven't tried it yet but constructor Dependency Injection using @Autowired should work too
Hope someone finds this helpful!